mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 14:45: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
@@ -304,7 +304,7 @@ export async function createAlertsRepository(
|
||||
dedupeKey: item.dedupeKey ?? null,
|
||||
createdAt,
|
||||
});
|
||||
await db.persist();
|
||||
await db.persist({ lazy: true });
|
||||
return toItem({
|
||||
id,
|
||||
...item,
|
||||
@@ -322,7 +322,7 @@ export async function createAlertsRepository(
|
||||
.update(items)
|
||||
.set({ deliveries: JSON.stringify(results) })
|
||||
.where(eq(items.id, id));
|
||||
await db.persist();
|
||||
await db.persist({ lazy: true });
|
||||
},
|
||||
|
||||
async hasUnreadWithKey(userId: string, key: string): Promise<boolean> {
|
||||
|
||||
Reference in new issue
Block a user