From a89234e3568b863b95f516b397a11770db1acef9 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Thu, 31 Oct 2024 15:26:13 +0800 Subject: [PATCH] Add exponential backoff for the export task --- packages/api/src/utils/createTask.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/api/src/utils/createTask.ts b/packages/api/src/utils/createTask.ts index 0998c2231a..af1d9894c4 100644 --- a/packages/api/src/utils/createTask.ts +++ b/packages/api/src/utils/createTask.ts @@ -1087,7 +1087,11 @@ export const queueExportJob = async (userId: string, exportId: string) => { removeOnComplete: true, removeOnFail: true, priority: getJobPriority(EXPORT_JOB_NAME), - attempts: 1, + attempts: 3, + backoff: { + type: 'exponential', + delay: 60_000, + }, } ) }