Skip to content

Commit

Permalink
Set uvloop for current thread explicitly. (#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivaaahn authored Dec 30, 2023
1 parent 7030a54 commit d8237b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion taskiq/cli/worker/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ def interrupt_handler(signum: int, _frame: Any) -> None:
loop = uvloop.new_event_loop() # type: ignore
else:
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)

asyncio.set_event_loop(loop)

# This option signals that current
# broker is running as a worker.
# We must set this field before importing tasks,
Expand Down

0 comments on commit d8237b8

Please sign in to comment.