-
-
Notifications
You must be signed in to change notification settings - Fork 108
Closed
Description
Description
Taskiq generates wrong task names when ivoked with relative paths on windows
MCVE
import asyncio
from taskiq import ZeroMQBroker
broker = ZeroMQBroker()
@broker.task()
async def spam() -> None:
await asyncio.sleep(0)
print("eggs")
async def main() -> None:
await broker.startup()
await asyncio.sleep(1)
await spam.kiq()
await broker.shutdown()
if __name__ == "__main__":
asyncio.run(main())Start broker
uv run taskiq worker demo:broker -w 1
And if lounch code with uv run demo.py everything good. But if i use current directory . it does't work
uv run ./demo.py
[taskiq.receiver.receiver][WARNING][worker-0] task "./demo:spam" is not found. Maybe you forgot to import it?
uv run .\demo.py
[taskiq.receiver.receiver][WARNING][worker-0] task "..demo:spam" is not found. Maybe you forgot to import it?
Also it does'n work if i use normal slashes on windows for module/demo.py name will be module/demo it should be module.demo
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels