switch job running to callback style

This commit is contained in:
2016-04-29 16:44:30 -07:00
parent 21830c9eb0
commit d4d38255f6

View File

@@ -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 = {};