remove in memory modification of monitor stats
This commit is contained in:
1 parent
ff114b3ab2
commit
b3930b31f2
7 files changed
+147
-248
No files matched your search
@@ -1,11 +1,12 @@
|
||||
import type { MonitorStats } from "@/types/index.js";
|
||||
import type { MonitorStats, CheckResultInput } from "@/types/index.js";
|
||||
|
||||
export interface IMonitorStatsRepository {
|
||||
// create
|
||||
create(data: Omit<MonitorStats, "id" | "createdAt" | "updatedAt">): Promise<MonitorStats>;
|
||||
// single fetch
|
||||
findByMonitorId(monitorId: string): Promise<MonitorStats>;
|
||||
// update
|
||||
updateByMonitorId(monitorId: string, data: Omit<MonitorStats, "id" | "monitorId" | "createdAt" | "updatedAt">): Promise<MonitorStats>;
|
||||
// Upsert must be atomic to prevent race conditions
|
||||
updateByMonitorId(monitorId: string, result: CheckResultInput): Promise<MonitorStats>;
|
||||
// delete
|
||||
deleteByMonitorId(monitorId: string): Promise<MonitorStats>;
|
||||
deleteByMonitorIds(monitorIds: string[]): Promise<number>;
|
||||
|
||||
Reference in new issue
Block a user