power-queues 2.1.0 → 2.1.1
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 +2 -1
- package/dist/index.js +2 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -724,6 +724,7 @@ var PowerQueues = class extends import_power_redis.PowerRedis {
|
|
|
724
724
|
if (!(0, import_full_utils.isStrFilled)(queueName)) {
|
|
725
725
|
throw new Error("Queue name is required.");
|
|
726
726
|
}
|
|
727
|
+
opts.job = opts.job ?? (0, import_uuid.v4)();
|
|
727
728
|
const batches = this.buildBatches(data, opts);
|
|
728
729
|
const result = new Array(data.length);
|
|
729
730
|
const promises = [];
|
|
@@ -750,7 +751,7 @@ var PowerQueues = class extends import_power_redis.PowerRedis {
|
|
|
750
751
|
});
|
|
751
752
|
if (opts.status) {
|
|
752
753
|
await this.redis.set(`${queueName}:${opts.job}:total`, data.length);
|
|
753
|
-
await this.redis.pexpire(`${queueName}:${opts.job}:total`,
|
|
754
|
+
await this.redis.pexpire(`${queueName}:${opts.job}:total`, this.logStatusTimeout);
|
|
754
755
|
}
|
|
755
756
|
await Promise.all(runners);
|
|
756
757
|
return result;
|
package/dist/index.js
CHANGED
|
@@ -707,6 +707,7 @@ var PowerQueues = class extends PowerRedis {
|
|
|
707
707
|
if (!isStrFilled(queueName)) {
|
|
708
708
|
throw new Error("Queue name is required.");
|
|
709
709
|
}
|
|
710
|
+
opts.job = opts.job ?? uuid();
|
|
710
711
|
const batches = this.buildBatches(data, opts);
|
|
711
712
|
const result = new Array(data.length);
|
|
712
713
|
const promises = [];
|
|
@@ -733,7 +734,7 @@ var PowerQueues = class extends PowerRedis {
|
|
|
733
734
|
});
|
|
734
735
|
if (opts.status) {
|
|
735
736
|
await this.redis.set(`${queueName}:${opts.job}:total`, data.length);
|
|
736
|
-
await this.redis.pexpire(`${queueName}:${opts.job}:total`,
|
|
737
|
+
await this.redis.pexpire(`${queueName}:${opts.job}:total`, this.logStatusTimeout);
|
|
737
738
|
}
|
|
738
739
|
await Promise.all(runners);
|
|
739
740
|
return result;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "power-queues",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
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",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"power-redis"
|
|
82
82
|
],
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"full-utils": "^3.0.
|
|
84
|
+
"full-utils": "^3.0.9",
|
|
85
85
|
"power-redis": "^2.0.23",
|
|
86
86
|
"uuid": "^13.0.0"
|
|
87
87
|
}
|