debugging braider
This commit is contained in:
parent
a164da9f25
commit
1e395d5278
5
node_modules/rss-braider/lib/RssBraider.js
generated
vendored
5
node_modules/rss-braider/lib/RssBraider.js
generated
vendored
@ -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');
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user