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
1 changed files with 3 additions and 1 deletions

View File

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