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

queue.push does not fail or given any error message when give wrong number of paramerts #593

Closed
raydemandforce opened this issue Aug 7, 2014 · 0 comments

Comments

@raydemandforce
Copy link

queue.push(task, [callback]) only take 2 parameters.

but when I give queue.push(task, "some stuff", [callback]) , the code does note fail. It finish without given error, also callback is not been called.

Example:

var async, q;

async = require("async");

q = async.queue(function(task, callback) {
  console.log("hello " + task.name);
  console.log(callback);
  callback();
}, 2);

q.drain = function() {
  console.log("all items have been processed");
};

q.push({
  name: "foo"
}, "1", function(err) {
  console.log("finished processing foo");
});

Output:

hello foo
[Function]
all items have been processed

Process finished with exit code 0
@raydemandforce raydemandforce changed the title queue.push does not fail or given any error message when give wrong number of paramert queue.push does not fail or given any error message when give wrong number of paramerts Aug 7, 2014
@aearly aearly closed this as completed in 5244f77 Jun 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants