Refactor backend: fix geo cache cleanup, scheduler heartbeat, correlation middleware; update docs
This commit is contained in:
@@ -254,8 +254,9 @@ async def _lifespan(app: FastAPI) -> AsyncGenerator[None, None]:
|
||||
# task's coroutine handles cleanup.
|
||||
import asyncio # noqa: TC003
|
||||
|
||||
current_task = asyncio.current_task()
|
||||
pending_tasks: list[asyncio.Task[Any]] = [
|
||||
t for t in asyncio.all_tasks() if not t.done()
|
||||
t for t in asyncio.all_tasks() if not t.done() and t is not current_task
|
||||
]
|
||||
if pending_tasks:
|
||||
log.info(
|
||||
|
||||
Reference in New Issue
Block a user