bull icon indicating copy to clipboard operation
bull copied to clipboard

Can worker know its own worker id?

Open hados99 opened this issue 6 years ago • 1 comments

Description

  • is it possible worker knows own unique worker id? especially when I execute worker (queue.process) with concurrency

Minimal, Working Test code to reproduce the issue.

(An easy to reproduce test case will dramatically decrease the resolution time.)

  • example
queue.process(3, (job, done) => {
   // I want to know my unique worker id or something in here
    console.log(`woker : ${job.id}, ${process.pid}`);
    job.progress(40);
    done();
});

Bull version

3.6.0

Additional information

hados99 avatar Jan 24 '19 15:01 hados99

It would be a nice addition.

manast avatar Jan 30 '19 19:01 manast