mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Lock retry
This commit is contained in:
@@ -86,7 +86,11 @@ export const identityUaServiceFactory = ({
|
||||
|
||||
let lock: Awaited<ReturnType<typeof keyStore.acquireLock>>;
|
||||
try {
|
||||
lock = await keyStore.acquireLock([KeyStorePrefixes.IdentityLockoutLock(LOCKOUT_KEY)], 1000);
|
||||
lock = await keyStore.acquireLock([KeyStorePrefixes.IdentityLockoutLock(LOCKOUT_KEY)], 500, {
|
||||
retryCount: 3,
|
||||
retryDelay: 300,
|
||||
retryJitter: 100
|
||||
});
|
||||
} catch (e) {
|
||||
logger.info(`login failed to acquire lock [lockoutKey=${LOCKOUT_KEY}]`);
|
||||
throw new RateLimitError({ message: "Rate limit exceeded" });
|
||||
|
||||
Reference in New Issue
Block a user