mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-04 13:26:16 +00:00
no release lock after backfill complete
This commit is contained in:
@@ -688,7 +688,7 @@ export const backfillUserAuthMethods = async () => {
|
|||||||
|
|
||||||
export const backfillPermission = async () => {
|
export const backfillPermission = async () => {
|
||||||
const lockKey = "backfill_permission_lock";
|
const lockKey = "backfill_permission_lock";
|
||||||
const timeout = 360000; // 6 min lock timeout in milliseconds
|
const timeout = 900000; // 15 min lock timeout in milliseconds
|
||||||
const lock = await redisClient?.set(lockKey, 1, "PX", timeout, "NX");
|
const lock = await redisClient?.set(lockKey, 1, "PX", timeout, "NX");
|
||||||
|
|
||||||
if (lock) {
|
if (lock) {
|
||||||
@@ -806,9 +806,8 @@ export const backfillPermission = async () => {
|
|||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("An error occurred when running script [backfillPermission]:", error);
|
console.error("An error occurred when running script [backfillPermission]:", error);
|
||||||
} finally {
|
|
||||||
await redisClient?.del(lockKey);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
console.info("Could not acquire lock for script [backfillPermission], skipping");
|
console.info("Could not acquire lock for script [backfillPermission], skipping");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user