Skip to content

Commit ec23065

Browse files
committed
fix: incorrect task names with __main__
1 parent 1f2e24e commit ec23065

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

taskiq/abc/broker.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,10 @@ def inner(
318318
fmodule = func.__module__
319319
if fmodule == "__main__": # pragma: no cover
320320
fmodule = ".".join(
321-
remove_suffix(sys.argv[0], ".py").split(
321+
remove_suffix(
322+
os.path.normpath(sys.argv[0]),
323+
".py",
324+
).split(
322325
os.path.sep,
323326
),
324327
)

0 commit comments

Comments
 (0)