mirror of
				https://github.com/avatao-content/test-tutorial-framework
				synced 2025-11-04 02:42:56 +00:00 
			
		
		
		
	Replace cleanup() with stop()
This commit is contained in:
		@@ -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()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user