Named Processor
const worker = new Worker(
'queueName',
async job => {
switch (job.name) {
case 'taskType1': {
await doSomeLogic1();
break;
}
case 'taskType2': {
await doSomeLogic2();
break;
}
}
},
{ connection },
);Last updated
Was this helpful?