mirror of
				https://github.com/avatao-content/baseimage-tutorial-framework
				synced 2025-11-04 02:42:56 +00:00 
			
		
		
		
	Make Terminado stoppable
This commit is contained in:
		@@ -45,6 +45,9 @@ class TerminadoMiniServer:
 | 
			
		||||
    def listen(self):
 | 
			
		||||
        self.application.listen(self.port)
 | 
			
		||||
 | 
			
		||||
    def stop(self):
 | 
			
		||||
        self.term_manager.shutdown()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
if __name__ == '__main__':
 | 
			
		||||
    LOG.info('Terminado Mini Server listening on %s', TFWENV.TERMINADO_PORT)
 | 
			
		||||
 
 | 
			
		||||
@@ -83,5 +83,6 @@ class TerminalEventHandler(EventHandlerBase):
 | 
			
		||||
        return data
 | 
			
		||||
 | 
			
		||||
    def cleanup(self):
 | 
			
		||||
        self.terminado_server.stop()
 | 
			
		||||
        if self.historymonitor:
 | 
			
		||||
            self.historymonitor.stop()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user