Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public async startMultiworker(): Promise {
const workerLogging = this.api.configs.tasks.workerLogging;
const schedulerLogging = this.api.configs.tasks.schedulerLogging;
// create a new multiworker instance
this.multiWorker = new NodeResque.MultiWorker(
{
connection: this.connectionDetails,
queues: this.api.configs.tasks.queues,
timeout: this.api.configs.tasks.timeout,
checkTimeout: this.api.configs.tasks.checkTimeout,
minTaskProcessors: this.api.configs.tasks.minTaskProcessors,
maxTaskProcessors: this.api.configs.tasks.maxTaskProcessors,
maxEventLoopDelay: this.api.configs.tasks.maxEventLoopDelay,
toDisconnectProcessors: this.api.configs.tasks.toDisconnectProcessors,
},
this.api.tasks.jobs,
);
// normal worker emitters
this.multiWorker.on("start", workerId =>
this.api.log("worker: started", workerLogging.start, {