Skip to content

Commit 77dc400

Browse files
committed
Fixed inmemory broker logic.
Signed-off-by: Pavel Kirilin <win10@list.ru>
1 parent 2177309 commit 77dc400

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

taskiq/brokers/inmemory_broker.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import inspect
22
from collections import OrderedDict
3-
from typing import Any, Callable, Coroutine, Optional, TypeVar
3+
from typing import Any, Callable, Coroutine, Optional, TypeVar, get_type_hints
44

55
from taskiq.abc.broker import AsyncBroker
66
from taskiq.abc.result_backend import AsyncResultBackend, TaskiqResult
@@ -128,6 +128,10 @@ async def kick(self, message: BrokerMessage) -> None:
128128
self.receiver.task_signatures[target_task.task_name] = inspect.signature(
129129
target_task.original_func,
130130
)
131+
if not self.receiver.task_hints.get(target_task.task_name):
132+
self.receiver.task_hints[target_task.task_name] = get_type_hints(
133+
target_task.original_func,
134+
)
131135

132136
await self.receiver.callback(message=message)
133137

0 commit comments

Comments
 (0)