Skip to content

Commit c7bdd1b

Browse files
authored
Add Windows event loop policy for compatibility
1 parent 9c339d6 commit c7bdd1b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

taskiq/cli/worker/run.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ def interrupt_handler(signum: int, _frame: Any) -> None:
124124
logger.debug("UVLOOP found. Using it as async runner")
125125
loop = uvloop.new_event_loop() # type: ignore
126126
else:
127+
if sys.platform == "win32":
128+
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
127129
loop = asyncio.new_event_loop()
128130

129131
asyncio.set_event_loop(loop)

0 commit comments

Comments
 (0)