@midwayjs/bull 3.15.0 → 3.15.2
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.d.ts +2 -1
- package/dist/framework.js +8 -1
- package/package.json +3 -3
package/dist/framework.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseFramework, IMidwayBootstrapOptions } from '@midwayjs/core';
|
|
1
|
+
import { BaseFramework, IMidwayBootstrapOptions, ILogger } from '@midwayjs/core';
|
|
2
2
|
import { Application, Context, IProcessor, IQueue, IQueueManager } from './interface';
|
|
3
3
|
import { Job, JobOptions, QueueOptions } from 'bull';
|
|
4
4
|
import Bull = require('bull');
|
|
@@ -12,6 +12,7 @@ export declare class BullFramework extends BaseFramework<Application, Context, a
|
|
|
12
12
|
private bullDefaultConcurrency;
|
|
13
13
|
private bullClearRepeatJobWhenStart;
|
|
14
14
|
private queueMap;
|
|
15
|
+
protected bullLogger: ILogger;
|
|
15
16
|
applicationInitialize(options: IMidwayBootstrapOptions): Promise<void>;
|
|
16
17
|
loadConfig(): void;
|
|
17
18
|
configure(): any;
|
package/dist/framework.js
CHANGED
|
@@ -5,6 +5,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
8
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
12
|
exports.BullFramework = exports.BullQueue = void 0;
|
|
10
13
|
const core_1 = require("@midwayjs/core");
|
|
@@ -75,7 +78,7 @@ let BullFramework = class BullFramework extends core_1.BaseFramework {
|
|
|
75
78
|
const queue = new BullQueue(name, (0, core_1.extend)(true, {}, this.bullDefaultQueueConfig, queueOptions));
|
|
76
79
|
this.queueMap.set(name, queue);
|
|
77
80
|
queue.on('error', err => {
|
|
78
|
-
this.
|
|
81
|
+
this.bullLogger.error(err);
|
|
79
82
|
});
|
|
80
83
|
return queue;
|
|
81
84
|
}
|
|
@@ -134,6 +137,10 @@ let BullFramework = class BullFramework extends core_1.BaseFramework {
|
|
|
134
137
|
}
|
|
135
138
|
}
|
|
136
139
|
};
|
|
140
|
+
__decorate([
|
|
141
|
+
(0, core_1.Logger)('bull'),
|
|
142
|
+
__metadata("design:type", Object)
|
|
143
|
+
], BullFramework.prototype, "bullLogger", void 0);
|
|
137
144
|
BullFramework = __decorate([
|
|
138
145
|
(0, core_1.Framework)()
|
|
139
146
|
], BullFramework);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/bull",
|
|
3
|
-
"version": "3.15.
|
|
3
|
+
"version": "3.15.2",
|
|
4
4
|
"description": "midway component for bull",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@midwayjs/core": "^3.15.0",
|
|
28
|
-
"@midwayjs/mock": "^3.15.
|
|
28
|
+
"@midwayjs/mock": "^3.15.2"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"bull": "4.12.2"
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"engines": {
|
|
34
34
|
"node": ">=12"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "e8b53689c50aa8c9a691de7d985cafd62f5f70e7"
|
|
37
37
|
}
|