88from faststream .types import SendableMessage
99from taskiq import AsyncBroker , BrokerMessage
1010from taskiq .acks import AckableMessage
11- from taskiq .decor import AsyncTaskiqDecoratedTask
1211
12+ from taskiq_faststream .task import PatchedTaskiqDecoratedTask
1313from taskiq_faststream .types import ScheduledTask
1414from taskiq_faststream .utils import resolve_msg
1515
@@ -33,6 +33,7 @@ class BrokerWrapper(AsyncBroker):
3333 def __init__ (self , broker : BrokerAsyncUsecase [typing .Any , typing .Any ]) -> None :
3434 super ().__init__ ()
3535 self .broker = broker
36+ self .decorator_class = PatchedTaskiqDecoratedTask
3637
3738 async def startup (self ) -> None :
3839 """Startup wrapped FastStream broker."""
@@ -76,7 +77,7 @@ def task( # type: ignore[override]
7677 * ,
7778 schedule : typing .List [ScheduledTask ],
7879 ** kwargs : PublishParameters ,
79- ) -> "AsyncTaskiqDecoratedTask [[], None]" :
80+ ) -> "PatchedTaskiqDecoratedTask [[], None]" :
8081 """Register FastStream scheduled task.
8182
8283 Args:
@@ -108,6 +109,7 @@ class AppWrapper(BrokerWrapper):
108109 def __init__ (self , app : FastStream ) -> None :
109110 super (BrokerWrapper , self ).__init__ ()
110111 self .app = app
112+ self .decorator_class = PatchedTaskiqDecoratedTask
111113
112114 async def startup (self ) -> None :
113115 """Startup wrapped FastStream."""
0 commit comments