-
Notifications
You must be signed in to change notification settings - Fork 24
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 access the bullmq job in the Job class handler #46
Comments
Hey @p3drosola! 👋🏻 What's your use case for accessing the job instance? |
Hi,
|
In my case in particular I need:
I understand the desire to provide a generic job queue wrapper, but for now It'd be preferable not cripple the bullmq functionality, and allow us to access the bullmq job object directly since this abstraction: a) does not support other job queues |
You are right. Better off leveraging BullMQ than trying to create a bad abstraction for now. It will be available using |
Hi @RomainLanz , I'm taking another stab at upgrading my app. I saw you added the getJob method but the latest version on NPM doesn't include it. Any chance you could publish a new version? Thanks in advance! |
In the v2 version of this library for adonis v5, to access the bullmq job you could access
this.job
in the handler function.I've checked the source and can see the
#bullMqJob
private variable, but it's not accesible by the classes that inherit from Job.Would you accept a pr for a
getJob
function, or a making the variable public?The text was updated successfully, but these errors were encountered: