Skip to content

Commit 52321a2

Browse files
committed
Fixed process sending eror.
1 parent 93ad003 commit 52321a2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

taskiq/decor.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
from collections.abc import Coroutine
23
from datetime import datetime
34
from types import CoroutineType
@@ -54,6 +55,15 @@ def __init__(
5455
self.broker = broker
5556
self.task_name = task_name
5657
self.original_func = original_func
58+
new_name = f"{original_func.__name__}__taskiq_original"
59+
self.original_func.__name__ = new_name
60+
self.original_func.__qualname__ = new_name
61+
setattr(
62+
sys.modules[original_func.__module__],
63+
new_name,
64+
original_func,
65+
)
66+
5767
self.labels = labels
5868

5969
# Docs for this method are omitted in order to help

0 commit comments

Comments
 (0)