@tryghost/job-manager 4.0.0 → 4.0.1
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/lib/JobManager.js +9 -1
- package/package.json +2 -2
package/lib/JobManager.js
CHANGED
|
@@ -44,8 +44,15 @@ class JobManager {
|
|
|
44
44
|
* @param {Function} [options.workerMessageHandler] - custom message handler coming from workers
|
|
45
45
|
* @param {Object} [options.JobModel] - a model which can persist job data in the storage
|
|
46
46
|
* @param {Object} [options.domainEvents] - domain events emitter
|
|
47
|
+
* @param {Object} [options.worker] - default Bree worker options
|
|
47
48
|
*/
|
|
48
|
-
constructor({
|
|
49
|
+
constructor({
|
|
50
|
+
errorHandler,
|
|
51
|
+
workerMessageHandler,
|
|
52
|
+
JobModel,
|
|
53
|
+
domainEvents,
|
|
54
|
+
worker: workerOptions,
|
|
55
|
+
}) {
|
|
49
56
|
this.inlineQueue = fastq(this, worker, 3);
|
|
50
57
|
this._jobMessageHandler = this._jobMessageHandler.bind(this);
|
|
51
58
|
this._jobErrorHandler = this._jobErrorHandler.bind(this);
|
|
@@ -72,6 +79,7 @@ class JobManager {
|
|
|
72
79
|
logger: logging,
|
|
73
80
|
errorHandler: combinedErrorHandler,
|
|
74
81
|
workerMessageHandler: combinedMessageHandler,
|
|
82
|
+
worker: workerOptions,
|
|
75
83
|
});
|
|
76
84
|
|
|
77
85
|
this.bree.on('worker created', (name) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryghost/job-manager",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Ghost Foundation",
|
|
6
6
|
"repository": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@sinonjs/fake-timers": "15.4.0",
|
|
31
|
-
"date-fns": "4.1
|
|
31
|
+
"date-fns": "4.2.1",
|
|
32
32
|
"rewire": "9.0.1",
|
|
33
33
|
"sinon": "22.0.0"
|
|
34
34
|
},
|