From dcb479f3d21c777d44315912e8b404db7924bca0 Mon Sep 17 00:00:00 2001 From: Ajay Date: Fri, 19 Jan 2024 14:35:32 -0500 Subject: [PATCH] Fallback to allowing taking a lock if redis fails --- src/utils/redisLock.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/utils/redisLock.ts b/src/utils/redisLock.ts index 52bb460..e02404f 100644 --- a/src/utils/redisLock.ts +++ b/src/utils/redisLock.ts @@ -37,6 +37,12 @@ export async function acquireLock(key: string, timeout = defaultTimeout): Promis } } catch (e) { Logger.error(e as string); + + // Fallback to allowing + return { + status: true, + unlock: () => void 0 + }; } return {