mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-30 11:28:19 +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) {
|
} catch (e) {
|
||||||
Logger.error(e as string);
|
Logger.error(e as string);
|
||||||
|
|
||||||
|
// Fallback to allowing
|
||||||
|
return {
|
||||||
|
status: true,
|
||||||
|
unlock: () => void 0
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user