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

Add a public method to Worker for starting polling job manually #50

Closed
purefun opened this issue Oct 25, 2019 · 2 comments
Closed

Add a public method to Worker for starting polling job manually #50

purefun opened this issue Oct 25, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@purefun
Copy link

purefun commented Oct 25, 2019

Worker will process the job immediately when it is instantiated. Is it possible to add a public method like start()? Then add a boolean option such as autostart to constructor arguments. Of course It's default value will be true. Thank you.

@manast manast added the enhancement New feature or request label Nov 6, 2019
@jaredjj3
Copy link

+1 to this idea. I think it's generally better to leave side effects outside of constructors.

@roggervalf
Copy link
Collaborator

currently there is an autorun option to be passed into Worker constructor to handle this https://github.com/taskforcesh/bullmq/blob/master/docs/gitbook/api/bullmq.workeroptions_2.autorun.md

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

No branches or pull requests

4 participants