Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get full job id in worker's processor? #817

Closed
michael-land opened this issue Oct 16, 2021 · 2 comments
Closed

How to get full job id in worker's processor? #817

michael-land opened this issue Oct 16, 2021 · 2 comments

Comments

@michael-land
Copy link

michael-land commented Oct 16, 2021

Looks like both job#queue and job#toKey are private. I need to get the full job id to set contextual info

@roggervalf
Copy link
Collaborator

hi @xiaoyu-tamu, there is queueName property in job https://github.com/taskforcesh/bullmq/blob/master/docs/gitbook/api/bullmq.job.queuename.md, so what you can do is concat the prefix that you use plus queueName plus job.id, something like {prefix}:{job.queueName}:{job.id}

@michael-land
Copy link
Author

Thanks. It would be nice job has this property. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants