Skip to content

Commit 975ada6

Browse files
committed
Fix bug found on debian 11 / python 3.9 droplet
1 parent c000350 commit 975ada6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/aleph/vm/orchestrator/supervisor.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,11 @@ async def stop_all_vms(app: web.Application):
140140

141141
def run():
142142
"""Run the VM Supervisor."""
143+
# Loop creation set here to avoid bug with Future on different loop
144+
143145
loop = asyncio.new_event_loop()
146+
# apparently needed for Python 3.9 / Debian 11
147+
asyncio.set_event_loop(loop)
144148
settings.check()
145149

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

164168
try:
165169
if settings.WATCH_FOR_MESSAGES:
166-
# FIXME We have a bug because task run on app.on_ don't run on the same loop?
167170
app.on_startup.append(start_watch_for_messages_task)
168171
app.on_startup.append(start_payment_monitoring_task)
169172
app.on_cleanup.append(stop_watch_for_messages_task)

0 commit comments

Comments
 (0)