From 1e395d5278286491d593d2bc7445fcec9512df45 Mon Sep 17 00:00:00 2001 From: Martin Donnelly Date: Fri, 31 Jul 2015 12:00:30 +0100 Subject: [PATCH] debugging braider --- node_modules/rss-braider/lib/RssBraider.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/node_modules/rss-braider/lib/RssBraider.js b/node_modules/rss-braider/lib/RssBraider.js index f09dd58..6891ad3 100644 --- a/node_modules/rss-braider/lib/RssBraider.js +++ b/node_modules/rss-braider/lib/RssBraider.js @@ -12,6 +12,7 @@ var FeedParser = require('feedparser'), var RssBraider = function (options) { this.uniques = {}; this.mdUniques = []; + this.feedCount = 0; if (!options) { options = {}; } @@ -80,6 +81,8 @@ RssBraider.prototype.processFeed = function(feed_name, format, callback) // Then process each item/article through rss-braider and any plugins async.each(feed.sources, function(source, callback) { console.log('+ async.each'); + self.feedCount++; + console.log('## FEED COUNT: ' + self.feedCount); var count = source.count || feed.default_count || 10, // Number of articles per source url = source.feed_url || null, file_path = source.file_path || null, @@ -149,6 +152,8 @@ RssBraider.prototype.processFeed = function(feed_name, format, callback) source_articles = self.date_sort(source_articles); source_articles = source_articles.slice(0, count); feed_articles = feed_articles.concat(source_articles); + self.feedCount--; + console.log('~~ FEED COUNT: ' + self.feedCount); callback(); console.log('- end'); });