Fallback to allowing taking a lock if redis fails

This commit is contained in:
Ajay 2024-01-19 14:35:32 -05:00
parent 2ad51842cc
commit dcb479f3d2

View file

@ -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 {