fix(beszel): disable request handler cache for stats to make live mode work (#6244)

This commit is contained in:
Thomas authored and GitHub committed 2026-07-10 17:16:23 +02:00
1 parent 0e513fffd5
commit 24c5d04bfa
8 files changed
+269 -9

No files matched your search

@@ -7,6 +7,7 @@ import type {
BeszelSystemDetails,
BeszelSystemStats,
BeszelSystemStatsRecord,
LiveStatsEvent,
} from "../../beszel/beszel-types";
const GB = 1024 * 1024 * 1024;
@@ -332,7 +333,7 @@ export class BeszelMockService {
public async subscribeRealtimeMetrics(
systemId: string,
onMessage: (data: { stats: BeszelSystemStatsRecord; containerStats: BeszelContainerStatsRecord | null }) => void,
onMessage: (event: LiveStatsEvent) => void,
signal: AbortSignal,
): Promise<void> {
const sys = resolveSystem(systemId);
@@ -348,7 +349,7 @@ export class BeszelMockService {
created: new Date().toISOString(),
updated: new Date().toISOString(),
};
onMessage({ stats: record, containerStats: null });
onMessage({ type: "system_stats", record });
};
if (signal.aborted) return;
await new Promise<void>((resolve) => {