mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-24 16:38:41 +03:00
Fallback to allowing taking a lock if redis fails
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user