Skip to content
This repository was archived by the owner on Dec 5, 2019. It is now read-only.

Commit

Permalink
fix: catch worker-farm errors
Browse files Browse the repository at this point in the history
  • Loading branch information
the-ress committed Oct 26, 2018
1 parent bf36e21 commit e988525
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/TaskRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ export default class TaskRunner {
}
: { maxConcurrentWorkers: this.maxConcurrentWorkers };
this.workers = workerFarm(workerOptions, workerFile);
this.boundWorkers = (options, cb) => this.workers(serialize(options), cb);
this.boundWorkers = (options, cb) => {
try {
this.workers(serialize(options), cb);
} catch (error) {
cb(error);
}
};
} else {
this.boundWorkers = (options, cb) => {
try {
Expand Down

0 comments on commit e988525

Please sign in to comment.