Skip to content

Commit 0ad9d0a

Browse files
fix
1 parent fb07920 commit 0ad9d0a

File tree

2 files changed

+6
-7
lines changed
  • packages
    • celery-library/src/celery_library/backends
    • service-library/src/servicelib/fastapi/queued_tasks

2 files changed

+6
-7
lines changed

packages/celery-library/src/celery_library/backends/_redis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
TaskMetadata,
1313
TaskUUID,
1414
)
15-
from servicelib.redis._client import RedisClientSDK
15+
from servicelib.redis import RedisClientSDK
1616

1717
from ..utils import build_task_id_prefix
1818

packages/service-library/src/servicelib/fastapi/queued_tasks/app_server.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff 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:

0 commit comments

Comments
 (0)