Skip to content

Commit b2668fd

Browse files
author
Andrei Neagu
committed
remvoe unused
1 parent 1056e6a commit b2668fd

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

2 files changed

+5
-11
lines changed
Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
from collections.abc import AsyncIterator
2-
from typing import Protocol
3-
41
from common_library.errors_classes import OsparcErrorMixin
5-
from fastapi import FastAPI
6-
from fastapi_lifespan_manager import State
72

83

94
class LifespanError(OsparcErrorMixin, RuntimeError): ...
@@ -15,7 +10,3 @@ class LifespanOnStartupError(LifespanError):
1510

1611
class LifespanOnShutdownError(LifespanError):
1712
msg_template = "Failed during shutdown of {module}"
18-
19-
20-
class LifespanGenerator(Protocol):
21-
def __call__(self, app: FastAPI) -> AsyncIterator["State"]: ...
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
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

36
from . 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]

0 commit comments

Comments
 (0)