Skip to content

Commit 35272d0

Browse files
committed
perf: release orphaned gate locks sooner
1 parent 89ef663 commit 35272d0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/pr-gates-lock.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
// A queued gate block legitimately waits out another full gate run; the
1111
// 10-minute per-command default in the lock runtime is far too short for that.
1212
const DEFAULT_GATE_LOCK_TIMEOUT_MS = 2 * 60 * 60 * 1000;
13-
const PARENT_WATCH_INTERVAL_MS = 2_000;
13+
const PARENT_WATCH_INTERVAL_MS = 500;
1414

1515
function parseArgs(argv) {
1616
const args = { statusFile: "" };
@@ -61,7 +61,7 @@ function main() {
6161
fs.writeFileSync(statusFile, "acquired\n");
6262

6363
// The owner-pid reclaim in the lock runtime already covers a SIGKILLed
64-
// holder; this watch releases promptly when the gate shell dies mid-block.
64+
// holder; this watch releases within half a second when the gate shell dies.
6565
// ppid 1 also counts as dead: orphans reparent to init/launchd, and a
6666
// helper that started orphaned has no gate block to hold the lock for.
6767
setInterval(() => {

0 commit comments

Comments
 (0)