Skip to content

Commit 1497542

Browse files
author
Aleksei Briushinin
committed
fix: remove startup/shutdown calls incompatible with Starlette 1.0
1 parent 26660b9 commit 1497542

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

taskiq_fastapi/initializator.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ async def startup(state: TaskiqState) -> None:
3838
raise ValueError(f"'{app_or_path}' is not a FastAPI application.")
3939

4040
state.fastapi_app = app
41-
await app.router.startup()
4241
state.lf_ctx = app.router.lifespan_context(app)
4342
asgi_state = await state.lf_ctx.__aenter__()
4443
populate_dependency_context(broker, app, asgi_state)
@@ -62,7 +61,6 @@ def shutdown_event_generator(
6261
async def shutdown(state: TaskiqState) -> None:
6362
if not broker.is_worker_process:
6463
return
65-
await state.fastapi_app.router.shutdown()
6664
await state.lf_ctx.__aexit__(None, None, None)
6765

6866
return shutdown

0 commit comments

Comments
 (0)