File tree Expand file tree Collapse file tree 2 files changed +5
-11
lines changed
packages/service-library/src/servicelib/fastapi
services/dynamic-scheduler/src/simcore_service_dynamic_scheduler/services/notifier Expand file tree Collapse file tree 2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change 1- from collections .abc import AsyncIterator
2- from typing import Protocol
3-
41from common_library .errors_classes import OsparcErrorMixin
5- from fastapi import FastAPI
6- from fastapi_lifespan_manager import State
72
83
94class LifespanError (OsparcErrorMixin , RuntimeError ): ...
@@ -15,7 +10,3 @@ class LifespanOnStartupError(LifespanError):
1510
1611class LifespanOnShutdownError (LifespanError ):
1712 msg_template = "Failed during shutdown of {module}"
18-
19-
20- class LifespanGenerator (Protocol ):
21- def __call__ (self , app : FastAPI ) -> AsyncIterator ["State" ]: ...
Original file line number Diff line number Diff line change 1- from servicelib .fastapi .lifespan_utils import LifespanGenerator
1+ from collections .abc import AsyncIterator , Callable
2+
3+ from fastapi import FastAPI
4+ from fastapi_lifespan_manager import State
25
36from . import _notifier , _socketio
47
58
6- def get_notifier_lifespans () -> list [LifespanGenerator ]:
9+ def get_notifier_lifespans () -> list [Callable [[ FastAPI ], AsyncIterator [ State ]] ]:
710 return [_socketio .lifespan , _notifier .lifespan ]
You can’t perform that action at this time.
0 commit comments