index.js
function(seriesCallback) {
                if(!obtainDates) {
                    seriesCallback();
                    return;
                }

                var pinDateMaps = [];
                async.eachLimit(boards, 5, function(board, eachCallback) {
                    getDatesForBoardPinsFromRss(board.user, board.board, function(result) {
                        pinDateMaps.push(result);
                        eachCallback();
                    });
                }, function (err) {
                    if(err) {
                        throw err;
                    }

                    var pinDateMap = mergeMaps(pinDateMaps);

                    for (var i = 0; i < allPinsData.length; i++) {
                        allPinsData[i].created_at = null;
                        allPinsData[i].created_at_source = null;
                        if (pinDateMap[allPinsData[i].id]) {
                            allPinsData[i].created_at = pinDateMap[allPinsData[i].id];
                            allPinsData[i].created_at_source = 'rss';
                        } else {
                            pinsThatNeedScrapedDates.push(allPinsData[i].id);
                        }
                    }

                    seriesCallback();
                    return;
                });
            }
function(seriesCallback) {
                if(!obtainDates) {
                    seriesCallback();
                    return;
                }

                var pinDateMaps = [];
                async.eachLimit(boards, 5, function(board, eachCallback) {
                    getDatesForBoardPinsFromRss(board.user, board.board, function(result) {
                        pinDateMaps.push(result);
                        eachCallback();
                    });
                }, function (err) {
                    if(err) {
                        throw err;
                    }

                    var pinDateMap = mergeMaps(pinDateMaps);

                    for (var i = 0; i < allPinsData.length; i++) {
                        allPinsData[i].created_at = null;
                        allPinsData[i].created_at_source = null;
                        if (pinDateMap[allPinsData[i].id]) {
                            allPinsData[i].created_at = pinDateMap[allPinsData[i].id];
                            allPinsData[i].created_at_source = 'rss';
                        } else {
                            pinsThatNeedScrapedDates.push(allPinsData[i].id);
                        }
                    }

                    seriesCallback();
                    return;
                });
            }
function ( seriesCallback ) { if ( ! obtainDates ) { seriesCallback ( ) ; return ; } var pinDateMaps = [ ] ; async . eachLimit ( boards , 5 , function ( board , eachCallback ) { getDatesForBoardPinsFromRss ( board . user , board . board , function ( result ) { pinDateMaps . push ( result ) ; eachCallback ( ) ; } ) ; } , function ( err ) { if ( err ) { throw err ; } var pinDateMap = mergeMaps ( pinDateMaps ) ; for ( var i = 0 ; i < allPinsData . length ; i ++ ) { allPinsData [ i ] . created_at = null ; allPinsData [ i ] . created_at_source = null ; if ( pinDateMap [ allPinsData [ i ] . id ] ) { allPinsData [ i ] . created_at = pinDateMap [ allPinsData [ i ] . id ] ; allPinsData [ i ] . created_at_source = 'rss' ; } else { pinsThatNeedScrapedDates . push ( allPinsData [ i ] . id ) ; } } seriesCallback ( ) ; return ; } ) ; }
get what dates we can for pins from the board RSS feeds
get what dates we can for pins from the board RSS feeds