Skip to content
Snippets Groups Projects
Commit 96961844 authored by Thomas Kluyver's avatar Thomas Kluyver
Browse files

Create quit_event after fork

parent 2760d5b1
No related branches found
No related tags found
No related merge requests found
......@@ -176,8 +176,9 @@ class ShutdownHandler(RequestHandler):
class ProxyApp:
quit_event: asyncio.Event
def __init__(self, creds, db_path='calparrot.sqlite'):
self.quit_event = asyncio.Event()
self.response_store = ResponsesDB(db_path)
base_url = creds['base_url'].rstrip('/') # e.g. https://in.xfel.eu/calibration
......@@ -210,6 +211,7 @@ class ProxyApp:
async def serve(self):
"""Serve requests until asked to quit"""
self.quit_event = asyncio.Event()
server = HTTPServer(self.tornado_app)
# add_sockets hooks up the server to the event loop
server.add_sockets(self.sockets)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment