Skip to content

Commit

Permalink
feat(truncate): schedule daily truncation job for Everland bucket in …
Browse files Browse the repository at this point in the history
…cron service to automate object management
  • Loading branch information
bigint committed Sep 3, 2024
1 parent 9c5e25f commit ea8abe7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/cron/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import cleanEmailTokens from './cleanEmailTokens';
import cleanPreferences from './cleanPreferences';
import dbVacuum from './dbVacuum';
import heartbeat from './heartbeat';
import truncate4EverlandBucket from './truncate4EverlandBucket';

const startCronJobs = () => {
logger.info('Cron jobs are started...');
Expand All @@ -24,6 +25,11 @@ const startCronJobs = () => {
return;
});

cron.schedule('0 0 * * *', async () => {
await truncate4EverlandBucket();
return;
});

cron.schedule('*/5 * * * *', async () => {
await cleanEmailTokens();
return;
Expand Down

1 comment on commit ea8abe7

@vercel
Copy link

@vercel vercel bot commented on ea8abe7 Sep 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

web – ./

heyxyz.vercel.app
web-git-main-heyxyz.vercel.app
hey.xyz
web-heyxyz.vercel.app

Please sign in to comment.