samedi 4 avril 2015

async.js and series issue


Vote count:

0




Try to run fetch after connect. Fetch is faster than connect, and in console I am getting fetch error because it returns result faster than connection done. But in documentation of async series is a tool to run second function after first returns result.



var bets = [];
async.series([
function(callback){
setTimeout(function(){
connect();
callback(null, 'one');
},1)
},
function(callback){
setTimeout(function(){
fetch_last_30();
callback(null, 'two');
},2000)
}
]);


asked 1 min ago







async.js and series issue

Aucun commentaire:

Enregistrer un commentaire