Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
start(): void {
this.queue = new Queue({
concurrency: this.opts.concurrency,
interval: this.opts.interval,
});
this.handle(this.base)()
.then(() => {
this.queue.on("start", () => this.emit("start"));
this.queue.on("stop", () => this.emit("stop"));
this.queue.on("tick", () => this.emit("tick"));
this.queue.on("resolve", (e) => this.emit("request", e));
this.queue.on("reject", (e) => this.emit("error", e));
this.queue.start();
})
.catch((error) => {
this.emit("error", error);