Skip to content

Commit

Permalink
Fix bug found on debian 11 / python 3.9 droplet
Browse files Browse the repository at this point in the history
  • Loading branch information
olethanh committed May 2, 2024
1 parent c000350 commit 975ada6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/aleph/vm/orchestrator/supervisor.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ async def stop_all_vms(app: web.Application):

def run():
"""Run the VM Supervisor."""
# Loop creation set here to avoid bug with Future on different loop

loop = asyncio.new_event_loop()

Check warning on line 145 in src/aleph/vm/orchestrator/supervisor.py

View check run for this annotation

Codecov / codecov/patch

src/aleph/vm/orchestrator/supervisor.py#L145

Added line #L145 was not covered by tests
# apparently needed for Python 3.9 / Debian 11
asyncio.set_event_loop(loop)

Check warning on line 147 in src/aleph/vm/orchestrator/supervisor.py

View check run for this annotation

Codecov / codecov/patch

src/aleph/vm/orchestrator/supervisor.py#L147

Added line #L147 was not covered by tests
settings.check()

engine = setup_engine()
Expand All @@ -163,7 +167,6 @@ def run():

try:
if settings.WATCH_FOR_MESSAGES:
# FIXME We have a bug because task run on app.on_ don't run on the same loop?
app.on_startup.append(start_watch_for_messages_task)
app.on_startup.append(start_payment_monitoring_task)
app.on_cleanup.append(stop_watch_for_messages_task)
Expand Down

0 comments on commit 975ada6

Please sign in to comment.