cli-swarm 7.0.25 → 7.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skill/SKILL.md +1 -1
- package/skill/skill.json +1 -1
- package/swarm-coordinator-fs.mjs +12 -2
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED
package/skill/skill.json
CHANGED
package/swarm-coordinator-fs.mjs
CHANGED
|
@@ -127,9 +127,19 @@ async function acquireStateLock(root) {
|
|
|
127
127
|
return lockPath
|
|
128
128
|
} catch (error) {
|
|
129
129
|
if (!(error instanceof Error && error.code === 'EEXIST')) throw error
|
|
130
|
-
|
|
130
|
+
let status
|
|
131
|
+
try {
|
|
132
|
+
status = await lstat(lockPath)
|
|
133
|
+
} catch (statusError) {
|
|
134
|
+
if (statusError instanceof Error && statusError.code === 'ENOENT') continue
|
|
135
|
+
throw statusError
|
|
136
|
+
}
|
|
131
137
|
if (Date.now() - status.mtimeMs > STALE_STATE_LOCK_MS) {
|
|
132
|
-
|
|
138
|
+
try {
|
|
139
|
+
await unlink(lockPath)
|
|
140
|
+
} catch (unlinkError) {
|
|
141
|
+
if (!(unlinkError instanceof Error && unlinkError.code === 'ENOENT')) throw unlinkError
|
|
142
|
+
}
|
|
133
143
|
continue
|
|
134
144
|
}
|
|
135
145
|
await new Promise((accept) => setTimeout(accept, LOCK_WAIT_MS))
|