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

The done callback and the job object should be passed to the job handler #23

Open
MarlBurroW opened this issue Sep 25, 2018 · 0 comments

Comments

@MarlBurroW
Copy link

MarlBurroW commented Sep 25, 2018

Currently, only the job payload is passed to the handle() method of a job class, I think it could be better to inject the job object and the done() callback too in order to have the same abilities as the default kue API (cf queue.process() method).
You probably want to provide an higher level API in the job classes, but sometime you need to use job.progress() or job.log() inside the job handler, or use the done() callback to return job specific errors, or complete the job programmatically.

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

1 participant