mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-30 07:05:24 +00:00
fix: high cpu from status probes and full database saves on every sample (#1300)
This commit is contained in:
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 });
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user