Skip to content

Commit

Permalink
Merge pull request #42 from tipiwiny/master
Browse files Browse the repository at this point in the history
BUGFIX removing job
  • Loading branch information
niftylettuce authored Oct 29, 2020
2 parents 90f9e9f + f023f71 commit 60c921e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ class Bree extends EventEmitter {
const job = this.config.jobs.find((j) => j.name === name);
if (!job) throw new Error(`Job "${name}" does not exist`);

this.config.jobs = this.config.jobs.find((j) => j.name !== name);
this.config.jobs = this.config.jobs.filter((j) => j.name !== name);

// make sure it also closes any open workers
this.stop(name);
Expand Down

0 comments on commit 60c921e

Please sign in to comment.