Skip to content

Commit 4a8f134

Browse files
committed
fix: stalled job cleanup
1 parent a627047 commit 4a8f134

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

patches/groupmq.patch

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/dist/lua/reserve-batch.lua b/dist/lua/reserve-batch.lua
2+
index 095536b0120d685ea39b6809cf19c97dd1639b0a..550e2ef0542d64ada75aa72ad7f5d58aa7a3b89d 100644
3+
--- a/dist/lua/reserve-batch.lua
4+
+++ b/dist/lua/reserve-batch.lua
5+
@@ -45,6 +45,9 @@ if (now - lastCheck) >= stalledCheckInterval then
6+
local headScore = tonumber(head[2])
7+
redis.call("ZADD", readyKey, headScore, gid)
8+
end
9+
+ -- Remove from group active list (BullMQ-style) - CRITICAL to unblock the group
10+
+ local groupActiveKey = ns .. ":g:" .. gid .. ":active"
11+
+ redis.call("LREM", groupActiveKey, 1, jobId)
12+
redis.call("DEL", ns .. ":lock:" .. gid)
13+
redis.call("DEL", procKey)
14+
redis.call("ZREM", processingKey, jobId)

pnpm-lock.yaml

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1+
patchedDependencies:
2+
groupmq: patches/groupmq.patch
13
onlyBuiltDependencies:
4+
- cpu-features
25
- esbuild
36
- msgpackr-extract
7+
- protobufjs
8+
- ssh2
49
- unrs-resolver

0 commit comments

Comments
 (0)