예제 #1
0
 def _signal_shutdown(self, signum, _):
     install_shutdown_handlers(self._signal_kill)
     signame = signal_names[signum]
     log.msg(format='Received %(signame)s, shutting down gracefully. Send again to force.',
             level=log.INFO, signame=signame)
     reactor.callFromThread(self.stop)
예제 #2
0
 def _signal_kill(self, signum, _):
     install_shutdown_handlers(signal.SIG_IGN)
     signame = signal_names[signum]
     log.msg(format='Received %(signame)s twice, forcing unclean shutdown.',
             level=log.INFO, signame=signame)
     reactor.callFromThread(self._stop_reactor)
예제 #3
0
 def __init__(self, engine):
     self.engine = engine
     install_shutdown_handlers(self._signal_shutdown)