mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2024-12-05 02:31:33 +00:00
Replace cleanup() with stop()
This commit is contained in:
parent
d33ba34454
commit
a1b4a87864
@ -151,12 +151,12 @@ def main():
|
||||
terminal.historymonitor.subscribe_callback(cenator)
|
||||
|
||||
event_handlers = EventHandlerBase.get_local_instances()
|
||||
def cleanup(sig, frame):
|
||||
def stop(sig, frame):
|
||||
for eh in event_handlers:
|
||||
eh.cleanup()
|
||||
eh.stop()
|
||||
exit(0)
|
||||
signal(SIGTERM, cleanup)
|
||||
signal(SIGINT, cleanup)
|
||||
signal(SIGTERM, stop)
|
||||
signal(SIGINT, stop)
|
||||
|
||||
IOLoop.instance().start()
|
||||
|
||||
|
@ -14,11 +14,11 @@ if __name__ == '__main__':
|
||||
)
|
||||
|
||||
event_handlers = EventHandlerBase.get_local_instances()
|
||||
def cleanup(sig, frame):
|
||||
def stop(sig, frame):
|
||||
for eh in event_handlers:
|
||||
eh.cleanup()
|
||||
eh.stop()
|
||||
exit(0)
|
||||
signal(SIGTERM, cleanup)
|
||||
signal(SIGINT, cleanup)
|
||||
signal(SIGTERM, stop)
|
||||
signal(SIGINT, stop)
|
||||
|
||||
IOLoop.instance().start()
|
||||
|
Loading…
Reference in New Issue
Block a user