Wait for all accounts to become ready to receive messages. This will initialize logging, start IO and the direct_imap attribute for each account which either is CONFIGURED already or which is CONFIGURING and successfully completing the configuration process.
(self)
| 320 | acc._evtracker.consume_events() |
| 321 | |
| 322 | def bring_online(self): |
| 323 | """Wait for all accounts to become ready to receive messages. |
| 324 | |
| 325 | This will initialize logging, start IO and the direct_imap attribute |
| 326 | for each account which either is CONFIGURED already or which is CONFIGURING |
| 327 | and successfully completing the configuration process. |
| 328 | """ |
| 329 | print("wait_all_configured finds accounts=", self._account2state) |
| 330 | for acc, state in self._account2state.items(): |
| 331 | if state == self.CONFIGURED: |
| 332 | self._onconfigure_start_io(acc) |
| 333 | self._account2state[acc] = self.IDLEREADY |
| 334 | |
| 335 | while self.CONFIGURING in self._account2state.values(): |
| 336 | acc = self._pop_config_success() |
| 337 | self._onconfigure_start_io(acc) |
| 338 | self._account2state[acc] = self.IDLEREADY |
| 339 | print("finished, account2state", self._account2state) |
| 340 | |
| 341 | def _pop_config_success(self): |
| 342 | acc, success, comment = self._configured_events.get() |
no test coverage detected