diff --git a/buildman/server.py b/buildman/server.py index 369f90313..d8702d962 100644 --- a/buildman/server.py +++ b/buildman/server.py @@ -76,12 +76,11 @@ class BuilderServer(object): logger.debug('Initializing all members of the event loop') loop = trollius.get_event_loop() - trollius.Task(self._initialize(loop, host, websocket_port, controller_port, ssl)) logger.debug('Starting server on port %s, with controller on port %s', websocket_port, controller_port) try: - loop.run_forever() + loop.run_until_complete(self._initialize(loop, host, websocket_port, controller_port, ssl)) except KeyboardInterrupt: pass finally: @@ -163,8 +162,6 @@ class BuilderServer(object): logger.debug('All workers are busy. Requeuing.') self._queue.incomplete(job_item, restore_retry=True, retry_after=0) - yield From(trollius.sleep(WORK_CHECK_TIMEOUT)) - @trollius.coroutine def _initialize(self, loop, host, websocket_port, controller_port, ssl=None): self._loop = loop