Fix event loop is closed in Celery workers

This commit is contained in:
Sergey Mankovsky
2026-02-11 19:29:23 +01:00
parent 70d17997ef
commit 208361c8cc

View File

@@ -22,6 +22,8 @@ def asynctask(f):
await database.disconnect()
coro = run_with_db()
if current_task:
return asyncio.run(coro)
try:
loop = asyncio.get_running_loop()
except RuntimeError: