MCPcopy
hub / github.com/breejs/bree / remove

Method remove

src/index.js:730–744  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

728 }
729
730 async remove(name) {
731 debug('remove', name);
732
733 if (!this._init) await this.init();
734
735 const job = this.config.jobs.find((j) => j.name === name);
736 if (!job) {
737 throw new Error(`Job "${name}" does not exist`);
738 }
739
740 // make sure it also closes any open workers
741 await this.stop(name);
742
743 this.config.jobs = this.config.jobs.filter((j) => j.name !== name);
744 }
745
746 /**
747 * A friendly helper to clear safe-timers timeout and interval

Callers 2

index.jsFile · 0.80
remove.jsFile · 0.80

Calls 2

initMethod · 0.95
stopMethod · 0.95

Tested by

no test coverage detected