How to use the detectLimit function from async
Find comprehensive JavaScript async.detectLimit code examples handpicked from public code repositorys.
GitHub: oeuillot/upnpserver
215 216 217 218 219 220 221
name = contentURL.basename; } var nodesIdsByTitle=map[name]; Async.detectLimit(nodesIdsByTitle, 2, (nodeId, callback) => { parentNode.service.getNodeById(nodeId, (error, node) => {
46
169
18
GitHub: entanmo/etm
63 64 65 66 67 68 69 70 71 72
P2PHelper.prototype.broadcast = function (cb) { modules.peer.getbootstrapNode( function (err, peers) { if (!err) { async.detectLimit(peers, 1, function (peer, cb) { var url = "/api/p2phelper"; if (peer.address) { url = "http://" + peer.address + url;
60
18
9
216 217 218 219 220 221
if (_.has(user, 'status') && user.status !== 'active') { app.logger.info({ user: user }, 'skipping inactive user'); return userCallback(); } async.detectLimit(_.union(likelyNotes, noteTitles), app.config.parallelLimit, function (noteTitle, noteTitleCallback) {
5
6
8
33 34 35 36 37 38 39 40 41 42
}) }) } async detectLimit(coll, limit, iteratee) { return new Promise(async (resolve, reject) => { async.detectLimit(coll, limit, iteratee, (err, res) => { if (err) { reject(err) } else { resolve(res)
1
0
1
+ 21 other calls in file
async.parallel is the most popular function in async (1226 examples)