@@ -11,13 +11,13 @@ def startup_event_generator(
11
11
app_or_path : Union [str , FastAPI ],
12
12
) -> Callable [[TaskiqState ], Awaitable [None ]]:
13
13
"""
14
- Generate shutdown event.
14
+ Generate startup event handler .
15
15
16
16
This function takes FastAPI application path
17
17
and runs startup event on broker's startup.
18
18
19
19
:param broker: current broker.
20
- :param app_path : fastapi application path.
20
+ :param app_or_path : fastapi instance or application path.
21
21
:returns: startup handler.
22
22
"""
23
23
@@ -48,7 +48,7 @@ def shutdown_event_generator(
48
48
broker : AsyncBroker ,
49
49
) -> Callable [[TaskiqState ], Awaitable [None ]]:
50
50
"""
51
- Generate shutdown event.
51
+ Generate shutdown event handler .
52
52
53
53
This function takes FastAPI application
54
54
and runs shutdown event on broker's shutdown.
@@ -78,7 +78,7 @@ def init(broker: AsyncBroker, app_or_path: Union[str, FastAPI]) -> None:
78
78
startup events will run.
79
79
80
80
:param broker: current broker to use.
81
- :param app_path: path to fastapi application.
81
+ :param app_or_path: fastapi instance or application path .
82
82
"""
83
83
broker .add_event_handler (
84
84
TaskiqEvents .WORKER_STARTUP ,
@@ -102,7 +102,7 @@ def populate_dependency_context(
102
102
This function injects the Request and HTTPConnection
103
103
into the broker's dependency context.
104
104
105
- It may be need to be called manually if you are using InMemoryBroker.
105
+ It may be needed to be called manually if you are using InMemoryBroker.
106
106
107
107
:param broker: current broker to use.
108
108
:param app: current application.
0 commit comments