mirror of
https://github.com/logos-blockchain/logos-blockchain-block-explorer-template.git
synced 2026-02-18 12:03:08 +00:00
15 lines
340 B
Python
15 lines
340 B
Python
import typing
|
|
from contextlib import AsyncExitStack, asynccontextmanager
|
|
|
|
from node.lifespan import node_lifespan
|
|
|
|
if typing.TYPE_CHECKING:
|
|
from core.app import NBE
|
|
|
|
|
|
@asynccontextmanager
|
|
async def lifespan(app: "NBE"):
|
|
async with AsyncExitStack() as stack:
|
|
await stack.enter_async_context(node_lifespan(app))
|
|
yield
|