Your parEach, .par and .par are actually executed all in parallel
with the same stack passed from .flatten() command

You should move your processing of every item (md5s, servers) into parEach 
like this.
i don't see why you want to make this calls async, since you just push 
object into array

.flatten().parEach(function(row, i){
>         console.log('[INFO]', 'Par Each');
>
>         var _this = this;
>         var cncInfo = new CNCInfo();
>         cncInfo._id = row.entry_id;
>         cncInfo.entry_id = row.entry_id;
>         cncInfo.entry_type = row.entry_type;
>
>         console.log('[A]',cncInfo);
>
>         // part 1
>         //cncInfo.md5s.push(cncInfo.entry_id);
>
>         // part 2
>         //cncInfo.servers.push(cncInfo.entry_id);
>
>         DbDest.write('botnet_cnc_info', cncInfo, function(err, resp){
>             if(err){
>                 _this(err);
>             }else{
>                 _this(null, resp);
>             }
>         });
>     }).seq('final', function(resp){
>
 

>      cleanup(null, resp);
>
       })

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to