From 3bc332c61f802b198942664fb72170e6fa7062bc Mon Sep 17 00:00:00 2001 From: Thomas Kluyver <thomas@kluyver.me.uk> Date: Tue, 9 Mar 2021 17:31:20 +0000 Subject: [PATCH] Get rid of ActionsServer.launch() coroutine --- webservice/webservice.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/webservice/webservice.py b/webservice/webservice.py index 664bd6ad9..218ef6799 100644 --- a/webservice/webservice.py +++ b/webservice/webservice.py @@ -646,11 +646,6 @@ class ActionsServer: self.socket.bind("{}:{}".format(config['web-service']['bind-to'], config['web-service']['port'])) - @classmethod - async def launch(cls, config, mode): - server = cls(config, mode) - return await server.run() - async def run(self): """The main server loop @@ -1185,8 +1180,9 @@ def main(): slurm_monitor_thread.start() # Launch the ZMQ server to handle requests for calibration + server = ActionsServer(config, mode) loop = asyncio.get_event_loop() - loop.run_until_complete(ActionsServer.launch(config, mode)) + loop.run_until_complete(server.run()) loop.close() -- GitLab