From 536422e60ba8a58ba6f223f32b1833beaa727c09 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 7 Mar 2024 11:23:09 +0100 Subject: [PATCH] Undo --- packages/backend-core/src/redis/redlockImpl.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/packages/backend-core/src/redis/redlockImpl.ts b/packages/backend-core/src/redis/redlockImpl.ts index 28babb9405..adeb5b12ec 100644 --- a/packages/backend-core/src/redis/redlockImpl.ts +++ b/packages/backend-core/src/redis/redlockImpl.ts @@ -82,11 +82,6 @@ type SuccessfulRedlockExecution = { } type UnsuccessfulRedlockExecution = { executed: false - reason: UnsuccessfulRedlockExecutionReason -} - -export const enum UnsuccessfulRedlockExecutionReason { - LockTakenWithTryOnce = "LOCK_TAKEN_WITH_TRY_ONCE", } type RedlockExecution = @@ -146,10 +141,7 @@ export async function doWithLock( if (opts.type === LockType.TRY_ONCE) { // don't throw for try-once locks, they will always error // due to retry count (0) exceeded - return { - executed: false, - reason: UnsuccessfulRedlockExecutionReason.LockTakenWithTryOnce, - } + return { executed: false } } else { throw e }