From 4c11bbf0da7dc58221566e826fa6656d0ddc3362 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Wed, 2 Feb 2022 19:17:50 +0000 Subject: [PATCH] Server: Disable session expiration logic for now As we do not know how many people have version 2.5+ --- packages/server/src/utils/setupTaskService.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/server/src/utils/setupTaskService.ts b/packages/server/src/utils/setupTaskService.ts index 908283870..f6de725e7 100644 --- a/packages/server/src/utils/setupTaskService.ts +++ b/packages/server/src/utils/setupTaskService.ts @@ -46,12 +46,17 @@ 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(), - }, + // This should be enabled eventually. As of version 2.5 + // (2021-11-08T11:07:11Z) all Joplin clients support handling of expired + // sessions, however we don't know how many people have Joplin 2.5+ so + // be safe we don't enable it just yet. + + // { + // id: TaskId.DeleteExpiredSessions, + // description: taskIdToLabel(TaskId.DeleteExpiredSessions), + // schedule: '0 */6 * * *', + // run: (models: Models) => models.session().deleteExpiredSessions(), + // }, ]; if (config.USER_DATA_AUTO_DELETE_ENABLED) {