From 2f09f884be28e05ea342a51cbb2728f106f3ff80 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Sun, 24 Oct 2021 12:22:49 +0100 Subject: [PATCH] Server: Run oversized account task more frequently --- packages/server/src/utils/setupTaskService.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/server/src/utils/setupTaskService.ts b/packages/server/src/utils/setupTaskService.ts index bb1ac925abf..cf54ec60f73 100644 --- a/packages/server/src/utils/setupTaskService.ts +++ b/packages/server/src/utils/setupTaskService.ts @@ -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(), }, ];