diff --git a/src/db/databaseUtil.ts b/src/db/databaseUtil.ts index f8079c97..d3ac8109 100644 --- a/src/db/databaseUtil.ts +++ b/src/db/databaseUtil.ts @@ -137,10 +137,10 @@ export async function logToDb(message: string): Promise { try { // Try to insert first, if it fails due to UNIQUE constraint, update instead - await platform.dbExec("INSERT INTO logs (date, message) VALUES (?, ?)", [ - nowKey, - message, - ]); + // await platform.dbExec("INSERT INTO logs (date, message) VALUES (?, ?)", [ + // nowKey, + // message, + // ]); // Clean up old logs (keep only last 7 days) - do this less frequently // Only clean up if the date is different from the last cleanup @@ -148,9 +148,9 @@ export async function logToDb(message: string): Promise { const sevenDaysAgo = new Date( new Date().getTime() - 7 * 24 * 60 * 60 * 1000, ); - await platform.dbExec("DELETE FROM logs WHERE date < ?", [ - sevenDaysAgo.toDateString(), - ]); + // await platform.dbExec("DELETE FROM logs WHERE date < ?", [ + // sevenDaysAgo.toDateString(), + // ]); lastCleanupDate = todayKey; } } catch (error) {