File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
services/dynamic-scheduler/src/simcore_service_dynamic_scheduler/core Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 77LifespanContextManager : TypeAlias = Callable [[FastAPI ], AsyncContextManager [None ]]
88
99
10- def combine_lfiespans (* lifespans : LifespanContextManager ) -> LifespanContextManager :
11- """Applyes the `setup` part of the context mangers in the order they are provided.
10+ def combine_lifespans (* lifespans : LifespanContextManager ) -> LifespanContextManager :
11+ """Applies the `setup` part of the contextmangers in the order they are provided.
1212 The `teardown` is in revere order with regarad to the `seutp`.
1313 """
1414
Original file line number Diff line number Diff line change 44import pytest
55from asgi_lifespan import LifespanManager
66from fastapi import FastAPI
7- from servicelib .fastapi .lifespan_utils import combine_lfiespans
7+ from servicelib .fastapi .lifespan_utils import combine_lifespans
88
99
1010async def test_multiple_lifespan_managers (capsys : pytest .CaptureFixture ):
@@ -20,7 +20,7 @@ async def cache_lifespan(_: FastAPI) -> AsyncIterator[None]:
2020 yield
2121 print ("shutdown CACHE" )
2222
23- app = FastAPI (lifespan = combine_lfiespans (database_lifespan , cache_lifespan ))
23+ app = FastAPI (lifespan = combine_lifespans (database_lifespan , cache_lifespan ))
2424
2525 capsys .readouterr ()
2626
Original file line number Diff line number Diff line change 22from contextlib import asynccontextmanager
33
44from fastapi import FastAPI
5- from servicelib .fastapi .lifespan_utils import LifespanContextManager , combine_lfiespans
5+ from servicelib .fastapi .lifespan_utils import LifespanContextManager , combine_lifespans
66from servicelib .fastapi .openapi import override_fastapi_openapi_method
77from servicelib .fastapi .profiler import initialize_profiler
88from servicelib .fastapi .prometheus_instrumentation import (
@@ -73,7 +73,7 @@ def create_app(settings: ApplicationSettings | None = None) -> FastAPI:
7373 "/doc" if app_settings .DYNAMIC_SCHEDULER_SWAGGER_API_DOC_ENABLED else None
7474 ),
7575 redoc_url = None ,
76- lifespan = combine_lfiespans (* lifespans , _lifespan_banner ),
76+ lifespan = combine_lifespans (* lifespans , _lifespan_banner ),
7777 )
7878 override_fastapi_openapi_method (app )
7979
You can’t perform that action at this time.
0 commit comments