switch job running to callback style
This commit is contained in:
@@ -99,9 +99,7 @@ export default class Job extends events.EventEmitter {
|
|||||||
_performJob(job) {
|
_performJob(job) {
|
||||||
this.debug(`Starting job ${job._id}`);
|
this.debug(`Starting job ${job._id}`);
|
||||||
|
|
||||||
return Bluebird.try(() => {
|
return Bluebird.fromCallback((cb) => this.workerFn(job._source.payload, cb))
|
||||||
return this.workerFn(job._source.payload);
|
|
||||||
})
|
|
||||||
.then((output) => {
|
.then((output) => {
|
||||||
const unknownMime = false;
|
const unknownMime = false;
|
||||||
const docOutput = {};
|
const docOutput = {};
|
||||||
|
|||||||
Reference in New Issue
Block a user