@midwayjs/bullmq 4.0.0-beta.7 → 4.0.0-beta.8

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.
@@ -15,6 +15,8 @@ const DefaultConfig = require("./config/config.default");
15
15
  const framework_1 = require("./framework");
16
16
  const constants_1 = require("./constants");
17
17
  let BullConfiguration = class BullConfiguration {
18
+ framework;
19
+ decoratorService;
18
20
  async init() {
19
21
  this.decoratorService.registerPropertyHandler(constants_1.BULLMQ_QUEUE_KEY, (propertyName, meta) => {
20
22
  return this.framework.getQueue(meta.queueName);
package/dist/decorator.js CHANGED
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InjectFlowProducer = exports.InjectWorker = exports.InjectQueue = exports.Processor = void 0;
3
+ exports.Processor = Processor;
4
+ exports.InjectQueue = InjectQueue;
5
+ exports.InjectWorker = InjectWorker;
6
+ exports.InjectFlowProducer = InjectFlowProducer;
4
7
  const core_1 = require("@midwayjs/core");
5
8
  const constants_1 = require("./constants");
6
9
  function Processor(queueName, jobOptions, workerOptions, queueOptions) {
@@ -16,23 +19,19 @@ function Processor(queueName, jobOptions, workerOptions, queueOptions) {
16
19
  (0, core_1.Scope)(core_1.ScopeEnum.Request)(target);
17
20
  };
18
21
  }
19
- exports.Processor = Processor;
20
22
  function InjectQueue(queueName) {
21
23
  return core_1.DecoratorManager.createCustomPropertyDecorator(constants_1.BULLMQ_QUEUE_KEY, {
22
24
  queueName,
23
25
  });
24
26
  }
25
- exports.InjectQueue = InjectQueue;
26
27
  function InjectWorker(queueName) {
27
28
  return core_1.DecoratorManager.createCustomPropertyDecorator(constants_1.BULLMQ_WORKER_KEY, {
28
29
  queueName,
29
30
  });
30
31
  }
31
- exports.InjectWorker = InjectWorker;
32
32
  function InjectFlowProducer(producerName) {
33
33
  return core_1.DecoratorManager.createCustomPropertyDecorator(constants_1.BULLMQ_FLOW_PRODUCER_KEY, {
34
34
  producerName,
35
35
  });
36
36
  }
37
- exports.InjectFlowProducer = InjectFlowProducer;
38
37
  //# sourceMappingURL=decorator.js.map
package/dist/framework.js CHANGED
@@ -14,12 +14,14 @@ const core_1 = require("@midwayjs/core");
14
14
  const bullmq_1 = require("bullmq");
15
15
  const constants_1 = require("./constants");
16
16
  class BullMQQueue extends bullmq_1.Queue {
17
+ queueName;
18
+ queueOptions;
19
+ queueEventsList = [];
20
+ queueEventsProducerList = [];
17
21
  constructor(queueName, queueOptions) {
18
22
  super(queueName, queueOptions);
19
23
  this.queueName = queueName;
20
24
  this.queueOptions = queueOptions;
21
- this.queueEventsList = [];
22
- this.queueEventsProducerList = [];
23
25
  }
24
26
  async addJobToQueue(data, options) {
25
27
  const { repeat, ...OtherOptions } = options ?? {};
@@ -75,12 +77,14 @@ class BullMQQueue extends bullmq_1.Queue {
75
77
  }
76
78
  exports.BullMQQueue = BullMQQueue;
77
79
  let BullMQFramework = class BullMQFramework extends core_1.BaseFramework {
78
- constructor() {
79
- super(...arguments);
80
- this.queueMap = new Map();
81
- this.workerMap = new Map();
82
- this.flowProducerMap = new Map();
83
- }
80
+ defaultConnection;
81
+ defaultQueueConfig;
82
+ defaultWorkerConfig;
83
+ clearRepeatJobWhenStart;
84
+ queueMap = new Map();
85
+ workerMap = new Map();
86
+ flowProducerMap = new Map();
87
+ bullMQLogger;
84
88
  async applicationInitialize(options) {
85
89
  this.app = {};
86
90
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/bullmq",
3
- "version": "4.0.0-beta.7",
3
+ "version": "4.0.0-beta.8",
4
4
  "description": "midway component for BullMQ",
5
5
  "main": "dist/index.js",
6
6
  "typings": "index.d.ts",
@@ -24,8 +24,8 @@
24
24
  ],
25
25
  "license": "MIT",
26
26
  "devDependencies": {
27
- "@midwayjs/core": "^4.0.0-beta.7",
28
- "@midwayjs/mock": "^4.0.0-beta.7"
27
+ "@midwayjs/core": "^4.0.0-beta.8",
28
+ "@midwayjs/mock": "^4.0.0-beta.8"
29
29
  },
30
30
  "dependencies": {
31
31
  "bullmq": "5.61.0"
@@ -34,5 +34,5 @@
34
34
  "node": ">=20"
35
35
  },
36
36
  "repository": "https://github.com/midwayjs/midway.git",
37
- "gitHead": "6a221788112b4d998b3958e0a275579f42816c59"
37
+ "gitHead": "355e55949fdd132b0bdcb4830222a0a027e92ded"
38
38
  }