power-queues 2.0.8 → 2.0.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 CHANGED
@@ -545,7 +545,7 @@ var PowerQueues = class extends import_power_redis.PowerRedis {
545
545
  async success(id, payload, createdAt, job, key) {
546
546
  if (this.executeJobStatus) {
547
547
  const prefix = `${this.stream}:${job}:`;
548
- const { ready = 0, ok = 0 } = await this.getMany(prefix);
548
+ const { ready = 0, ok = 0 } = await this.getMany(`${prefix}*`);
549
549
  await this.setMany([{ key: `${prefix}ready`, value: ready + 1 }, { key: `${prefix}ok`, value: ok + 1 }], this.executeJobStatusTtlSec);
550
550
  }
551
551
  await this.onSuccess(id, payload, createdAt, job, key);
@@ -556,7 +556,7 @@ var PowerQueues = class extends import_power_redis.PowerRedis {
556
556
  async error(err, id, payload, createdAt, job, key, attempt) {
557
557
  if (this.executeJobStatus && attempt >= this.workerMaxRetries) {
558
558
  const prefix = `${this.stream}:${job}:`;
559
- const { ready = 0, err: err2 = 0 } = await this.getMany(prefix);
559
+ const { ready = 0, err: err2 = 0 } = await this.getMany(`${prefix}*`);
560
560
  await this.setMany([{ key: `${prefix}ready`, value: ready + 1 }, { key: `${prefix}err`, value: err2 + 1 }], this.executeJobStatusTtlSec);
561
561
  }
562
562
  await this.onError(err, id, payload, createdAt, job, key);
package/dist/index.js CHANGED
@@ -519,7 +519,7 @@ var PowerQueues = class extends PowerRedis {
519
519
  async success(id, payload, createdAt, job, key) {
520
520
  if (this.executeJobStatus) {
521
521
  const prefix = `${this.stream}:${job}:`;
522
- const { ready = 0, ok = 0 } = await this.getMany(prefix);
522
+ const { ready = 0, ok = 0 } = await this.getMany(`${prefix}*`);
523
523
  await this.setMany([{ key: `${prefix}ready`, value: ready + 1 }, { key: `${prefix}ok`, value: ok + 1 }], this.executeJobStatusTtlSec);
524
524
  }
525
525
  await this.onSuccess(id, payload, createdAt, job, key);
@@ -530,7 +530,7 @@ var PowerQueues = class extends PowerRedis {
530
530
  async error(err, id, payload, createdAt, job, key, attempt) {
531
531
  if (this.executeJobStatus && attempt >= this.workerMaxRetries) {
532
532
  const prefix = `${this.stream}:${job}:`;
533
- const { ready = 0, err: err2 = 0 } = await this.getMany(prefix);
533
+ const { ready = 0, err: err2 = 0 } = await this.getMany(`${prefix}*`);
534
534
  await this.setMany([{ key: `${prefix}ready`, value: ready + 1 }, { key: `${prefix}err`, value: err2 + 1 }], this.executeJobStatusTtlSec);
535
535
  }
536
536
  await this.onError(err, id, payload, createdAt, job, key);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "power-queues",
3
- "version": "2.0.8",
3
+ "version": "2.0.9",
4
4
  "description": "Base classes for implementing custom queues in redis under high load conditions based on nestjs.",
5
5
  "author": "ihor-bielchenko",
6
6
  "license": "MIT",