fix: scope inflight snapshots and compact mobile dashboard (#2650)

This commit is contained in:
RockChinQ
2026-10-11 23:08:31 +08:00
committed by GitHub
parent 0b5b4cca59
commit 13446ecfd3
5 changed files with 57 additions and 2 deletions
@@ -1674,6 +1674,15 @@ class MonitoringService(ExecutionDetailsMixin):
}
async def get_inflight_snapshot(self, context: TenantContext, previous: list[dict] | None = None) -> dict:
"""SSE producers outlive the HTTP handler's tenant scope."""
workspace = require_workspace_uuid(context)
tenant_scope = getattr(self.ap.persistence_mgr, 'tenant_scope', None)
if callable(tenant_scope):
async with tenant_scope(workspace):
return await self._get_inflight_snapshot(context, previous)
return await self._get_inflight_snapshot(context, previous)
async def _get_inflight_snapshot(self, context: TenantContext, previous: list[dict] | None = None) -> dict:
"""Bounded Workspace snapshot without dashboard aggregates or token payloads."""
from ....utils.inflight import inflight_hub