Skip to content

Commit

Permalink
Server: Run oversized account task more frequently
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent22 committed Oct 24, 2021
1 parent bc5a853 commit 2f09f88
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/server/src/utils/setupTaskService.ts
Expand Up @@ -18,10 +18,15 @@ export default function(env: Env, models: Models, config: Config): TaskService {
schedule: '0 * * * *',
run: (models: Models) => models.item().updateTotalSizes(),
},

// Need to do it relatively frequently so that if the user fixes
// whatever was causing the oversized account, they can get it
// re-enabled quickly. Also it's done on minute 30 because it depends on
// the UpdateTotalSizes task being run.
{
id: TaskId.HandleOversizedAccounts,
description: 'Process oversized accounts',
schedule: '0 14 * * *',
schedule: '0 */2 30 * *',
run: (models: Models) => models.user().handleOversizedAccounts(),
},
];
Expand Down

0 comments on commit 2f09f88

Please sign in to comment.