Make TerminadoMiniServer compatible with an external IOLoop

This commit is contained in:
Kristóf Tóth 2018-03-03 14:47:55 +01:00
parent 4873bbf421
commit 6312e22117

View File

@ -30,9 +30,9 @@ class TerminadoMiniServer:
def listen(self): def listen(self):
self.application.listen(self.port) self.application.listen(self.port)
IOLoop.instance().start()
if __name__ == '__main__': if __name__ == '__main__':
log.info('Terminado Mini Server listening on {}'.format(tfwenv.TERMINADO_PORT)) log.info('Terminado Mini Server listening on {}'.format(tfwenv.TERMINADO_PORT))
TerminadoMiniServer('/terminal', tfwenv.TERMINADO_PORT, tfwenv.TERMINADO_WD, ['bash']).listen() TerminadoMiniServer('/terminal', tfwenv.TERMINADO_PORT, tfwenv.TERMINADO_WD, ['bash']).listen()
IOLoop.instance().start()