power-queues 2.0.15 → 2.0.16
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 +12 -4
- package/dist/index.js +12 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -163,13 +163,21 @@ var IdempotencyDone = `
|
|
|
163
163
|
local doneKey = KEYS[1]
|
|
164
164
|
local lockKey = KEYS[2]
|
|
165
165
|
local startKey = KEYS[3]
|
|
166
|
+
|
|
166
167
|
redis.call('SET', doneKey, 1)
|
|
167
|
-
|
|
168
|
-
|
|
168
|
+
|
|
169
|
+
local ttlMs = tonumber(ARGV[1]) or 0
|
|
170
|
+
if ttlMs > 0 then
|
|
171
|
+
redis.call('PEXPIRE', doneKey, ttlMs)
|
|
172
|
+
end
|
|
173
|
+
|
|
169
174
|
if redis.call('GET', lockKey) == ARGV[2] then
|
|
170
175
|
redis.call('DEL', lockKey)
|
|
171
|
-
if startKey then
|
|
176
|
+
if startKey then
|
|
177
|
+
redis.call('DEL', startKey)
|
|
178
|
+
end
|
|
172
179
|
end
|
|
180
|
+
|
|
173
181
|
return 1
|
|
174
182
|
`;
|
|
175
183
|
var IdempotencyFree = `
|
|
@@ -264,7 +272,7 @@ var PowerQueues = class extends import_power_redis.PowerRedis {
|
|
|
264
272
|
this.addingBatchTasksCount = 800;
|
|
265
273
|
this.addingBatchKeysLimit = 1e4;
|
|
266
274
|
this.workerExecuteLockTimeoutMs = 18e4;
|
|
267
|
-
this.workerCacheTaskTimeoutMs =
|
|
275
|
+
this.workerCacheTaskTimeoutMs = 6e4;
|
|
268
276
|
this.approveBatchTasksCount = 2e3;
|
|
269
277
|
this.removeOnExecuted = false;
|
|
270
278
|
this.executeBatchAtOnce = false;
|
package/dist/index.js
CHANGED
|
@@ -146,13 +146,21 @@ var IdempotencyDone = `
|
|
|
146
146
|
local doneKey = KEYS[1]
|
|
147
147
|
local lockKey = KEYS[2]
|
|
148
148
|
local startKey = KEYS[3]
|
|
149
|
+
|
|
149
150
|
redis.call('SET', doneKey, 1)
|
|
150
|
-
|
|
151
|
-
|
|
151
|
+
|
|
152
|
+
local ttlMs = tonumber(ARGV[1]) or 0
|
|
153
|
+
if ttlMs > 0 then
|
|
154
|
+
redis.call('PEXPIRE', doneKey, ttlMs)
|
|
155
|
+
end
|
|
156
|
+
|
|
152
157
|
if redis.call('GET', lockKey) == ARGV[2] then
|
|
153
158
|
redis.call('DEL', lockKey)
|
|
154
|
-
if startKey then
|
|
159
|
+
if startKey then
|
|
160
|
+
redis.call('DEL', startKey)
|
|
161
|
+
end
|
|
155
162
|
end
|
|
163
|
+
|
|
156
164
|
return 1
|
|
157
165
|
`;
|
|
158
166
|
var IdempotencyFree = `
|
|
@@ -247,7 +255,7 @@ var PowerQueues = class extends PowerRedis {
|
|
|
247
255
|
this.addingBatchTasksCount = 800;
|
|
248
256
|
this.addingBatchKeysLimit = 1e4;
|
|
249
257
|
this.workerExecuteLockTimeoutMs = 18e4;
|
|
250
|
-
this.workerCacheTaskTimeoutMs =
|
|
258
|
+
this.workerCacheTaskTimeoutMs = 6e4;
|
|
251
259
|
this.approveBatchTasksCount = 2e3;
|
|
252
260
|
this.removeOnExecuted = false;
|
|
253
261
|
this.executeBatchAtOnce = false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "power-queues",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.16",
|
|
4
4
|
"description": "High-performance Redis Streams queue for Node.js with Lua-powered bulk XADD, idempotent workers, heartbeat locks, stuck-task recovery, retries, DLQ, and distributed processing.",
|
|
5
5
|
"author": "ihor-bielchenko",
|
|
6
6
|
"license": "MIT",
|