Allow the buildman server to die if an uncaught exception terminates the scheduler process.
This commit is contained in:
parent
c308794063
commit
2e86417329
1 changed files with 1 additions and 4 deletions
|
@ -76,12 +76,11 @@ class BuilderServer(object):
|
||||||
|
|
||||||
logger.debug('Initializing all members of the event loop')
|
logger.debug('Initializing all members of the event loop')
|
||||||
loop = trollius.get_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,
|
logger.debug('Starting server on port %s, with controller on port %s', websocket_port,
|
||||||
controller_port)
|
controller_port)
|
||||||
try:
|
try:
|
||||||
loop.run_forever()
|
loop.run_until_complete(self._initialize(loop, host, websocket_port, controller_port, ssl))
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
pass
|
pass
|
||||||
finally:
|
finally:
|
||||||
|
@ -163,8 +162,6 @@ class BuilderServer(object):
|
||||||
logger.debug('All workers are busy. Requeuing.')
|
logger.debug('All workers are busy. Requeuing.')
|
||||||
self._queue.incomplete(job_item, restore_retry=True, retry_after=0)
|
self._queue.incomplete(job_item, restore_retry=True, retry_after=0)
|
||||||
|
|
||||||
yield From(trollius.sleep(WORK_CHECK_TIMEOUT))
|
|
||||||
|
|
||||||
@trollius.coroutine
|
@trollius.coroutine
|
||||||
def _initialize(self, loop, host, websocket_port, controller_port, ssl=None):
|
def _initialize(self, loop, host, websocket_port, controller_port, ssl=None):
|
||||||
self._loop = loop
|
self._loop = loop
|
||||||
|
|
Reference in a new issue