From 69170dd362027368aa7c2815f36903545eb2a945 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Tue, 1 Feb 2022 17:57:01 +0000 Subject: [PATCH] Server: Enabled task to automatically delete sessions every 6 hours --- packages/server/src/utils/setupTaskService.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/server/src/utils/setupTaskService.ts b/packages/server/src/utils/setupTaskService.ts index 42187b3e2e..9082838700 100644 --- a/packages/server/src/utils/setupTaskService.ts +++ b/packages/server/src/utils/setupTaskService.ts @@ -46,12 +46,12 @@ export default function(env: Env, models: Models, config: Config, services: Serv run: (models: Models) => models.user().handleOversizedAccounts(), }, - // { - // id: TaskId.DeleteExpiredSessions, - // description: taskIdToLabel(TaskId.DeleteExpiredSessions), - // schedule: '0 */6 * * *', - // run: (models: Models) => models.session().deleteExpiredSessions(), - // }, + { + id: TaskId.DeleteExpiredSessions, + description: taskIdToLabel(TaskId.DeleteExpiredSessions), + schedule: '0 */6 * * *', + run: (models: Models) => models.session().deleteExpiredSessions(), + }, ]; if (config.USER_DATA_AUTO_DELETE_ENABLED) {