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

Avoid invoking a constructor #2

Open
rauno56 opened this issue Nov 16, 2014 · 0 comments
Open

Avoid invoking a constructor #2

rauno56 opened this issue Nov 16, 2014 · 0 comments

Comments

@rauno56
Copy link
Owner

rauno56 commented Nov 16, 2014

At https://github.com/Rauno56/kue-chain/blob/master/index.js#L41 the parent job constructor is invoked to get the type of job to listen complete event on. It is bad in many sense.

Best solution which comes to mind is to create a factory function for constructing the different type of job prototypes and then save the type to somewhere on the object.

@rauno56 rauno56 mentioned this issue Nov 16, 2014
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