Example #1
0
 def run(self):
     app = web.Application()
     app.router.add_get('/', self.handle_get)
     app.router.add_post('/', self.handle_post)
     try:
         web.run_app(app, host=self.hostname, port=self.port, handle_signals=True, print=False)
     except Exception:
         pass
     finally:
         print("Shutting down http proxy")
         raise GracefulExit()
Example #2
0
 def __exit():
     if started:
         daemon.stop_event.set()
     else:
         raise GracefulExit()
Example #3
0
 def __exit():
     raise GracefulExit()