async.js Questions

2

Solved

I'm trying to traverse a tree of nested of items using async.js. The traversal terminates after going through just one branch. var count=0; exports.buildFamily = function(item_id, mback){ var ext...
Dempster asked 9/10, 2015 at 2:56

2

async.retry({times : 25,interval : 30000},myFunction.bind(functionData),function(err,results){ console.log("===================================") console.log("Async function finished processing") r...
Judge asked 12/9, 2015 at 9:57

2

I am unfortunately new to node and running into some confusion regarding the asynchronous/synchronous execution of node. I am using node, sequelize with sqlite and async.js. I have a series of Ar...
Historied asked 4/8, 2015 at 16:55

2

Solved

When using async.waterfall within a for loop, it appears that the for loop iterates before the nested async.waterfall finishes all its steps. How can this be avoided? for(var i = 0; i < users.l...
Vespucci asked 4/8, 2015 at 1:14

4

async.map(list, function(object, callback) { async.series([ function(callback) { console.log("1"); var booltest = false; // assuming some logic is performed that may or may not change boolte...
Quadratic asked 7/5, 2013 at 15:55

1

Solved

Been fighting with async module for half a day but can't get it to work properly when nesting few levels. So this works ok: var async = require('async') var myarr = ["Outer - A", "Outer - B"...
Donnydonnybrook asked 7/9, 2014 at 17:9

3

Solved

I have multiple Gulp tasks that send a series of commands to the shell. The second task is dependent on the first. How do make ensure all commands sent to async.series in the first task are complet...
Bracteate asked 18/8, 2014 at 20:3

2

Solved

I have a loop in node.js for (var i in files){ var all = fs.readdirsync("./0"); async.eachSeries(all, function(item){ check(item); } } The check(item) has a callback to another function. A...
Omentum asked 26/5, 2014 at 6:33

2

Solved

I'm working on a project that involves making multiple HTTP GET requests to different APIs, each requiring information from the last. I'm trying to avoid nested-callaback-and-counter-hell, and have...
Liable asked 17/4, 2014 at 18:46

2

Solved

Disclaimer: non-engineer, very new to JS Hey all - I'm trying to leverage the async.js module to chain a group of functions together. My desired output is to iterate over mapData (array of objects...
Schott asked 29/3, 2014 at 16:19

1

Solved

I have a large node.js application that heavily uses the async.js module. I have a lot of code like this: async.series([ function(callback){ sql.update(query, callback); }, function(callback...
Lythraceous asked 19/3, 2014 at 18:14

2

Solved

I'm writing a test code which gathers the result from Web APIs on node.js by using 'request.js' and 'async.js'. Here's my sample code; var request = require('request'); var async = require('async...
Jugum asked 2/10, 2013 at 14:38

2

Solved

In an attempt to grasp Q.js, I'd like to convert the following code using async.series in Q.js. Basically I create a folder if it doesn't exist (using mkdirp), move a file into a backup folder and ...
Zone asked 29/8, 2013 at 11:42

2

Solved

I want to know how parallel execution works in async.js async = require('async') async.parallel([ function(callback){ for (var i = 0; i < 1000000000; i++) /* Do nothing */; console.log(&quot...
Miosis asked 16/6, 2013 at 19:59

3

Solved

In the next example I don't have access to variable "locals" inside the functions "fetcher", "parser" and "saveToDb". var parser = require('parser.js'); var fetcher = require('fetcher.js'); var sa...
Britton asked 7/6, 2013 at 14:33

1

Solved

Just trying to get my head around using Async module for NodeJS. I have the following code. var a1 = [1,2,3,4,5,6,7,8]; async.forEachSeries(a1, function(n1, callback) { console.log(n1); var a2 ...
Quenchless asked 11/4, 2013 at 7:18

2

Solved

I'm trying to use async and request module together but i don't understand how the callbacks get passed. My code is var fetch = function(file, cb) { return request(file, cb); }; async.map(['file...
Heathenism asked 16/6, 2012 at 11:25

1

Solved

I am using the node.js async package, specifically forEachSeries, to make a series of http requests based on parameters drawn from an array. In the callback of each request I have some if/else stat...
Edging asked 11/4, 2012 at 13:15

© 2022 - 2024 — McMap. All rights reserved.