@midwayjs/bull 3.10.7 → 3.10.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/framework.js +4 -3
- package/package.json +5 -5
package/dist/framework.js
CHANGED
|
@@ -42,12 +42,13 @@ let BullFramework = class BullFramework extends core_1.BaseFramework {
|
|
|
42
42
|
return 'bull';
|
|
43
43
|
}
|
|
44
44
|
async run() {
|
|
45
|
-
var _a;
|
|
45
|
+
var _a, _b;
|
|
46
46
|
const processorModules = (0, core_1.listModule)(constants_1.BULL_PROCESSOR_KEY);
|
|
47
47
|
for (const mod of processorModules) {
|
|
48
48
|
const options = (0, core_1.getClassMetadata)(constants_1.BULL_PROCESSOR_KEY, mod);
|
|
49
|
+
const { repeat, delay, ...otherOptions } = (_a = options.jobOptions) !== null && _a !== void 0 ? _a : {};
|
|
49
50
|
const currentQueue = this.ensureQueue(options.queueName, {
|
|
50
|
-
defaultJobOptions:
|
|
51
|
+
defaultJobOptions: otherOptions,
|
|
51
52
|
});
|
|
52
53
|
// clear old repeat job when start
|
|
53
54
|
if (this.bullClearRepeatJobWhenStart) {
|
|
@@ -57,7 +58,7 @@ let BullFramework = class BullFramework extends core_1.BaseFramework {
|
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
60
|
await this.addProcessor(mod, options.queueName, options.concurrency);
|
|
60
|
-
if ((
|
|
61
|
+
if ((_b = options.jobOptions) === null || _b === void 0 ? void 0 : _b.repeat) {
|
|
61
62
|
await this.runJob(options.queueName, {}, options.jobOptions);
|
|
62
63
|
}
|
|
63
64
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/bull",
|
|
3
|
-
"version": "3.10.
|
|
3
|
+
"version": "3.10.9",
|
|
4
4
|
"description": "midway component for bull",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
],
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@midwayjs/core": "^3.10.
|
|
28
|
-
"@midwayjs/mock": "^3.10.
|
|
27
|
+
"@midwayjs/core": "^3.10.9",
|
|
28
|
+
"@midwayjs/mock": "^3.10.9"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"bull": "4.10.
|
|
31
|
+
"bull": "4.10.4"
|
|
32
32
|
},
|
|
33
33
|
"engines": {
|
|
34
34
|
"node": ">=12"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "4c8368283bd5ff3c14c23080838e2567c3e9a749"
|
|
37
37
|
}
|