@trigger.dev/redis-worker 4.0.0-v4-beta.8 → 4.0.0-v4-beta.9
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/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -9498,8 +9498,6 @@ var SimpleQueue = class {
|
|
|
9498
9498
|
continue;
|
|
9499
9499
|
}
|
|
9500
9500
|
const visibilityTimeoutMs = parsedItem.visibilityTimeoutMs;
|
|
9501
|
-
const invisibleUntil = now + visibilityTimeoutMs;
|
|
9502
|
-
await this.redis.zadd(`queue`, invisibleUntil, id);
|
|
9503
9501
|
dequeuedItems.push({
|
|
9504
9502
|
id,
|
|
9505
9503
|
job: parsedItem.job,
|
|
@@ -9677,6 +9675,9 @@ var SimpleQueue = class {
|
|
|
9677
9675
|
|
|
9678
9676
|
redis.call('ZADD', queue, invisibleUntil, id)
|
|
9679
9677
|
table.insert(dequeued, {id, serializedItem, score})
|
|
9678
|
+
else
|
|
9679
|
+
-- Remove the orphaned queue entry if no corresponding item exists
|
|
9680
|
+
redis.call('ZREM', queue, id)
|
|
9680
9681
|
end
|
|
9681
9682
|
end
|
|
9682
9683
|
|