@yrpri/api 9.0.195 → 9.0.196

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yrpri/api",
3
- "version": "9.0.195",
3
+ "version": "9.0.196",
4
4
  "license": "MIT",
5
5
  "author": "Robert Bjarnason & Citizens Foundation",
6
6
  "repository": {
@@ -27,14 +27,17 @@ if (redisUrl.startsWith("rediss://")) {
27
27
  };
28
28
  }
29
29
  log.info("Starting app access to BullMQ Queue", { redis_url: redisUrl });
30
- MAIN_WORKER_QUEUE_NAME = process.env.MAIN_WORKER_QUEUE_NAME || 'mainYpQueue';
30
+ const queuePrefix = process.env.MAIN_WORKER_QUEUE_NAME ||
31
+ process.env.MAIN_QUEUE_NAME ||
32
+ process.env.BULL_PREFIX ||
33
+ 'mainYpQueue';
31
34
  class YpQueue {
32
35
  constructor() {
33
36
  log.info("Create YpQueue");
34
37
  this.processors = new Map(); // Store processors per job name
35
38
  this.workers = new Map(); // Store workers per job name
36
39
  this.queues = new Map(); // Store queues per job name
37
- this.queuePrefix = MAIN_WORKER_QUEUE_NAME;
40
+ this.queuePrefix = queuePrefix;
38
41
  }
39
42
  get defaultJobOptions() {
40
43
  return {
@@ -4,7 +4,7 @@ declare class YpQueue {
4
4
  processors: Map<any, any>;
5
5
  workers: Map<any, any>;
6
6
  queues: Map<any, any>;
7
- queuePrefix: any;
7
+ queuePrefix: string;
8
8
  get defaultJobOptions(): {
9
9
  attempts: number;
10
10
  removeOnComplete: boolean;