From d497284b40dede0c4aae4fe68d46166207195d63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20M=C3=B3ricz?= Date: Thu, 12 Sep 2024 19:47:15 +0200 Subject: [PATCH] feat(api/queue): auto-remove completed jobs after 25 hours --- apps/api/src/services/queue-service.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/api/src/services/queue-service.ts b/apps/api/src/services/queue-service.ts index 113b3fa3..14dddebe 100644 --- a/apps/api/src/services/queue-service.ts +++ b/apps/api/src/services/queue-service.ts @@ -16,6 +16,14 @@ export function getScrapeQueue() { scrapeQueueName, { connection: redisConnection, + defaultJobOptions: { + removeOnComplete: { + age: 90000, // 25 hours + }, + removeOnFail: { + age: 90000, // 25 hours + }, + }, } // { // settings: {