You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
varasync,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
The text was updated successfully, but these errors were encountered:
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
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:
Output:
The text was updated successfully, but these errors were encountered: