mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-24 10:34:01 +03:00
Update resources.py
This commit is contained in:
parent
cc2304e46e
commit
00adf99c00
|
@ -25,3 +25,13 @@ class AsyncResource(Generic[T], metaclass=abc.ABCMeta):
|
||||||
|
|
||||||
async def shutdown(self, resource: Optional[T]) -> None:
|
async def shutdown(self, resource: Optional[T]) -> None:
|
||||||
...
|
...
|
||||||
|
|
||||||
|
|
||||||
|
class AsyncShutdownResource(Generic[T], metaclass=abc.ABCMeta):
|
||||||
|
|
||||||
|
@abc.abstractmethod
|
||||||
|
def init(self, *args, **kwargs) -> Optional[T]:
|
||||||
|
...
|
||||||
|
|
||||||
|
async def shutdown(self, resource: Optional[T]) -> None:
|
||||||
|
...
|
||||||
|
|
Loading…
Reference in New Issue
Block a user