cron: run cleanupEvents on startup

This commit is contained in:
Alex Gleason 2023-09-05 21:52:16 -05:00
parent a69b7f54f8
commit f2ccb5254e
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -11,7 +11,9 @@ async function cleanupEvents() {
local: false, local: false,
}]); }]);
console.log(`Deleted ${result?.numDeletedRows ?? 0} events.`); console.log(`Cleaned up ${result?.numDeletedRows ?? 0} old remote events.`);
} }
await cleanupEvents();
cron.every15Minute(cleanupEvents); cron.every15Minute(cleanupEvents);