mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 01:02:30 +01:00
Fallback to allowing taking a lock if redis fails
This commit is contained in:
parent
2ad51842cc
commit
dcb479f3d2
1 changed files with 6 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue