fix: high cpu from status probes and full database saves on every sample (#1300)

This commit is contained in:
LukeGus committed 2026-10-03 15:37:11 -05:00
1 parent 11a22d30eb
commit 79bd10a1b0
10 files changed
+241 -22

No files matched your search

@@ -40,7 +40,7 @@ export function createProxmoxNodeHistoryRepository(
async create(input: ProxmoxNodeHistoryCreateInput): Promise<void> {
const drizzle = await client();
await drizzle.insert(table).values(input);
await db.persist();
await db.persist({ lazy: true });
},
async listRange(
@@ -73,7 +73,7 @@ export function createProxmoxNodeHistoryRepository(
await drizzle
.delete(table)
.where(and(eq(table.hostId, hostId), lt(table.ts, cutoff)));
await db.persist();
await db.persist({ lazy: true });
},
};
}