From 2088d8e30a822f0d112b7c6e3b8d63cddc55c137 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Tue, 3 Jun 2025 11:50:54 +0100 Subject: [PATCH] Merge pull request #25954 from overleaf/bg-history-expire-worker-fix fix expire_redis_chunks to only clear job on error GitOrigin-RevId: f7ec435edda95958b453fba501686dcfd84426f7 --- .../history-v1/storage/scripts/expire_redis_chunks.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/services/history-v1/storage/scripts/expire_redis_chunks.js b/services/history-v1/storage/scripts/expire_redis_chunks.js index af2be097b6..60ce4c66f6 100644 --- a/services/history-v1/storage/scripts/expire_redis_chunks.js +++ b/services/history-v1/storage/scripts/expire_redis_chunks.js @@ -14,12 +14,9 @@ logger.initialize('expire-redis-chunks') async function expireProjectAction(projectId) { const job = await claimExpireJob(projectId) - try { - await expireProject(projectId) - } finally { - if (job && job.close) { - await job.close() - } + await expireProject(projectId) + if (job && job.close) { + await job.close() } }