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

Get rid of ActionsServer.launch() coroutine

parent 99b45849
No related branches found
No related tags found
1 merge request!449Webservice: update Slurm jobs status in a separate thread
...@@ -646,11 +646,6 @@ class ActionsServer: ...@@ -646,11 +646,6 @@ class ActionsServer:
self.socket.bind("{}:{}".format(config['web-service']['bind-to'], self.socket.bind("{}:{}".format(config['web-service']['bind-to'],
config['web-service']['port'])) config['web-service']['port']))
@classmethod
async def launch(cls, config, mode):
server = cls(config, mode)
return await server.run()
async def run(self): async def run(self):
"""The main server loop """The main server loop
...@@ -1185,8 +1180,9 @@ def main(): ...@@ -1185,8 +1180,9 @@ def main():
slurm_monitor_thread.start() slurm_monitor_thread.start()
# Launch the ZMQ server to handle requests for calibration # Launch the ZMQ server to handle requests for calibration
server = ActionsServer(config, mode)
loop = asyncio.get_event_loop() loop = asyncio.get_event_loop()
loop.run_until_complete(ActionsServer.launch(config, mode)) loop.run_until_complete(server.run())
loop.close() loop.close()
......
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