fix: 保留 Todo 写后健康计数
This commit is contained in:
@@ -129,15 +129,20 @@ async function enqueueMutation<T>(operation: () => Promise<T>): Promise<T> {
|
||||
|
||||
function recordSuccessfulWrite(snapshot: TodoSnapshot, persisted: Record<string, unknown>): void {
|
||||
const hash = snapshotHash(snapshot);
|
||||
const config = gitStorage.summary();
|
||||
storageState = {
|
||||
ok: true,
|
||||
initialized: true,
|
||||
checkedAt: new Date().toISOString(),
|
||||
config: gitStorage.summary(),
|
||||
config,
|
||||
verification: {
|
||||
ok: true,
|
||||
primary: gitStorage.enabled() ? "github-repo" : "postgres",
|
||||
instances: snapshot.instances.length,
|
||||
reminderNotifications: snapshot.reminderNotifications.length,
|
||||
databaseHash: hash,
|
||||
gitHash: gitStorage.enabled() ? hash : null,
|
||||
head: config.head,
|
||||
},
|
||||
lastWrite: persisted,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user