File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
celery-library/src/celery_library/backends
service-library/src/servicelib/fastapi/queued_tasks Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 1212 TaskMetadata ,
1313 TaskUUID ,
1414)
15- from servicelib .redis . _client import RedisClientSDK
15+ from servicelib .redis import RedisClientSDK
1616
1717from ..utils import build_task_id_prefix
1818
Original file line number Diff line number Diff line change @@ -14,19 +14,18 @@ class FastAPIAppServer(BaseAppServer):
1414 def __init__ (self , app : FastAPI ):
1515 super ().__init__ ()
1616 self ._app = app
17- self ._lifespan_manager : LifespanManager | None = None
17+ self ._lifespan_manager = LifespanManager (
18+ self .fastapi_app ,
19+ startup_timeout = _STARTUP_TIMEOUT ,
20+ shutdown_timeout = _SHUTDOWN_TIMEOUT ,
21+ )
1822
1923 @property
2024 def fastapi_app (self ) -> FastAPI :
2125 assert isinstance (self ._app , FastAPI ) # nosec
2226 return self ._app
2327
2428 async def on_startup (self ) -> None :
25- self ._lifespan_manager = LifespanManager (
26- self .fastapi_app ,
27- startup_timeout = _STARTUP_TIMEOUT ,
28- shutdown_timeout = _SHUTDOWN_TIMEOUT ,
29- )
3029 await self ._lifespan_manager .__aenter__ ()
3130
3231 async def on_shutdown (self ) -> None :
You can’t perform that action at this time.
0 commit comments