Skip to content

Commit ff22559

Browse files
authored
Set event loop for current thread explicltly. (#230)
1 parent 9edfe4e commit ff22559

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

taskiq/cli/worker/run.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ def interrupt_handler(signum: int, _frame: Any) -> None:
117117
loop = uvloop.new_event_loop() # type: ignore
118118
else:
119119
loop = asyncio.new_event_loop()
120+
asyncio.set_event_loop(loop)
120121
# This option signals that current
121122
# broker is running as a worker.
122123
# We must set this field before importing tasks,

0 commit comments

Comments
 (0)