mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-05-02 02:38:38 +00:00
refactor(session-synchronizer): update last scanned timestamp based on synchronization results
This commit is contained in:
@@ -28,14 +28,15 @@ export const scanStateDb = {
|
||||
return lastScannedDate;
|
||||
},
|
||||
|
||||
updateLastScannedAt() {
|
||||
updateLastScannedAt(scannedAt: Date = new Date()) {
|
||||
const db = getConnection();
|
||||
const sqliteTimestamp = scannedAt.toISOString().slice(0, 19).replace('T', ' ');
|
||||
|
||||
db.prepare(`
|
||||
INSERT INTO scan_state (id, last_scanned_at)
|
||||
VALUES (1, CURRENT_TIMESTAMP)
|
||||
VALUES (1, ?)
|
||||
ON CONFLICT (id)
|
||||
DO UPDATE SET last_scanned_at = CURRENT_TIMESTAMP
|
||||
`).run();
|
||||
DO UPDATE SET last_scanned_at = excluded.last_scanned_at
|
||||
`).run(sqliteTimestamp);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user