Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private async startQueue() {
this.queue = new NodeResque.Queue(
{
connection: this.connectionDetails,
},
this.api.tasks.jobs,
);
this.queue.on("error", error =>
this.api.log(error, LogLevel.Error, "[api.resque.scheduler]"),
);
await this.queue.connect();
}
export default jobs => {
const queue = new NodeResque.Queue({ connection: storage.resqueConfig }, jobs);
queue.on('error', error => {
logger('error', 'queue: error -> ', error);
});
return queue;
};