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

Allow access to Job#queue #1032

Closed
bogdan opened this issue Jan 28, 2022 · 1 comment
Closed

Allow access to Job#queue #1032

bogdan opened this issue Jan 28, 2022 · 1 comment

Comments

@bogdan
Copy link

bogdan commented Jan 28, 2022

I was surprised that Job#queue property is protected.

https://github.com/taskforcesh/bullmq/blob/master/src/classes/job.ts#L107

That is the limitation the doesn't allow some abstraction code around the job like:

const cloneJob = (job: Job) => {
  job.queue.add(job.name, job.data)
}

Is it possible to make Job#queue property public?

@manast
Copy link
Contributor

manast commented Feb 13, 2022

It is easy to workaround this issue by just extending the Queue class...

@manast manast closed this as completed Feb 13, 2022
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