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
When I use async.waterfall, it fails if I have more that 5 functions. When I use async.series, it fails if I have more than 6 functions. Sometimes async.series works with more than 6 but if I refresh the page then it stops working. Does async.waterfall/async.series have any limitation? How do I solve this issue? I'm new to javascript so can you guys help me with this? Below is the code that i try to work on
async.series([function(callback){async.waterfall([function(callback){bars.results(function(results){results.forEach(function(result,index){result.marker=bars.markers[index];})callback(null,results)});},function(results_with_distance,callback){// Sort array based on distanceresults_with_distance.sort(compare);callback(null,results_with_distance);}],function(err,final_results){callback(null,final_results);});},function(callback){async.waterfall([function(callback){coffee.results(function(results){results.forEach(function(result,index){result.marker=coffee.markers[index];})callback(null,results)});},function(results_with_distance,callback){// Sort array based on distanceresults_with_distance.sort(compare);callback(null,results_with_distance);}],function(err,final_results){callback(null,final_results);});},function(callback){async.waterfall([function(callback){restaurants.results(function(results){results.forEach(function(result,index){result.marker=restaurants.markers[index];})callback(null,results)});},function(results_with_distance,callback){// Sort array based on distanceresults_with_distance.sort(compare);callback(null,results_with_distance);}],function(err,final_results){callback(null,final_results);});},function(callback){async.waterfall([function(callback){schools.results(function(results){results.forEach(function(result,index){result.marker=schools.markers[index];})callback(null,results)});},function(results_with_distance,callback){// Sort array based on distanceresults_with_distance.sort(compare);callback(null,results_with_distance);}],function(err,final_results){callback(null,final_results);});},function(callback){async.waterfall([function(callback){parks.results(function(results){results.forEach(function(result,index){result.marker=parks.markers[index];})callback(null,results)});},function(results_with_distance,callback){// Sort array based on distanceresults_with_distance.sort(compare);callback(null,results_with_distance);}],function(err,final_results){callback(null,final_results);});},function(callback){async.waterfall([function(callback){shoppings.results(function(results){results.forEach(function(result,index){result.marker=shoppings.markers[index];})callback(null,results)});},function(results_with_distance,callback){// Sort array based on distanceresults_with_distance.sort(compare);callback(null,results_with_distance);}],function(err,final_results){callback(null,final_results);});},function(callback){async.waterfall([function(callback){groceries.results(function(results){results.forEach(function(result,index){result.marker=groceries.markers[index];})callback(null,results)});},function(results_with_distance,callback){// Sort array based on distanceresults_with_distance.sort(compare);callback(null,results_with_distance);}],function(err,final_results){callback(null,final_results);});},],function(err,results){console.log(results);})
The text was updated successfully, but these errors were encountered:
When I use async.waterfall, it fails if I have more that 5 functions. When I use async.series, it fails if I have more than 6 functions. Sometimes async.series works with more than 6 but if I refresh the page then it stops working. Does async.waterfall/async.series have any limitation? How do I solve this issue? I'm new to javascript so can you guys help me with this? Below is the code that i try to work on
The text was updated successfully, but these errors were encountered: