From c56e45ecef571d8eece5fba9054906ab8077e417 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Tue, 31 May 2022 10:54:02 +0200 Subject: [PATCH] fix: always remove completed tasks (#8771) --- packages/backend/src/queue/index.ts | 2 ++ packages/backend/src/services/note/create.ts | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/queue/index.ts b/packages/backend/src/queue/index.ts index 67d5f5d24..c5fd7de1c 100644 --- a/packages/backend/src/queue/index.ts +++ b/packages/backend/src/queue/index.ts @@ -305,11 +305,13 @@ export default function() { systemQueue.add('resyncCharts', { }, { repeat: { cron: '0 0 * * *' }, + removeOnComplete: true, }); systemQueue.add('cleanCharts', { }, { repeat: { cron: '0 0 * * *' }, + removeOnComplete: true, }); systemQueue.add('checkExpiredMutings', { diff --git a/packages/backend/src/services/note/create.ts b/packages/backend/src/services/note/create.ts index ceb5e8cc7..e2bf9d5b5 100644 --- a/packages/backend/src/services/note/create.ts +++ b/packages/backend/src/services/note/create.ts @@ -312,7 +312,8 @@ export default async (user: { id: User['id']; username: User['username']; host: endedPollNotificationQueue.add({ noteId: note.id, }, { - delay + delay, + removeOnComplete: true, }); }