-
Notifications
You must be signed in to change notification settings - Fork 66
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
params for job callback not documented #88
Comments
I was confused by this as well, I am glad I am not the only one. The documentation for this library isn't the greatest. |
back in the old days, before promises got popular, we used the callback pattern to write async code. this pattern was so universal at that time that it did not make sense to document it here. here's a reference if you're curious about the pattern: https://nodejs.dev/en/learn/javascript-asynchronous-programming-and-callbacks/#handling-errors-in-callbacks |
i'm hoping someone will come along and rewrite this module to be a bit more promise oriented since that's what most folks are using today... read #86 and send a pr! |
That makes sense. I read some of your other comments and I ended up using Promise.all() instead of the queue library, but it was fun to play around with. Thanks for the knowledge on the callback pattern though! |
from the docs:
so it is implied that the second parameter of
cb
should be the value that will end up onq.results
, but what does the first parameter ofcb
mean (withnull
value in the example)?I assume the first param would take an error if there was one. But I dunno.
The text was updated successfully, but these errors were encountered: