From 4b33c42da7e9d38aa5c303b9e9367efbf76b1dc6 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Wed, 19 May 2021 16:12:31 +0900 Subject: [PATCH] Add queue timeout (#7519) --- src/queue/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/queue/index.ts b/src/queue/index.ts index 01dd020d9..c7b7f0392 100644 --- a/src/queue/index.ts +++ b/src/queue/index.ts @@ -71,6 +71,7 @@ export function deliver(user: ThinUser, content: unknown, to: string | null) { return deliverQueue.add(data, { attempts: config.deliverJobMaxAttempts || 12, + timeout: 1 * 60 * 1000, // 1min backoff: { type: 'exponential', delay: 60 * 1000 @@ -88,6 +89,7 @@ export function inbox(activity: IActivity, signature: httpSignature.IParsedSigna return inboxQueue.add(data, { attempts: config.inboxJobMaxAttempts || 8, + timeout: 5 * 60 * 1000, // 5min backoff: { type: 'exponential', delay: 60 * 1000