summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMeiMei <30769358+mei23@users.noreply.github.com>2021-05-19 16:12:31 +0900
committerGitHub <noreply@github.com>2021-05-19 16:12:31 +0900
commit4b33c42da7e9d38aa5c303b9e9367efbf76b1dc6 (patch)
treeaa475af6a6910c5ca48171e5c1287d5cb1d1a933
parentFix Agent type, httpでもDNSキャッシュ (#7520) (diff)
downloadsharkey-4b33c42da7e9d38aa5c303b9e9367efbf76b1dc6.tar.gz
sharkey-4b33c42da7e9d38aa5c303b9e9367efbf76b1dc6.tar.bz2
sharkey-4b33c42da7e9d38aa5c303b9e9367efbf76b1dc6.zip
Add queue timeout (#7519)
-rw-r--r--src/queue/index.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/queue/index.ts b/src/queue/index.ts
index 01dd020d93..c7b7f0392c 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