Skip to content

Commit

Permalink
add feedFromList stats to report.js
Browse files Browse the repository at this point in the history
  • Loading branch information
radiovisual committed Jun 3, 2018
1 parent 9f54507 commit fe9deb3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const {version} = require('./../package');

module.exports.logStartMessage = function (refreshTime, birdwatch) {
const {server, port, url} = birdwatch.options;
const feeds = birdwatch.feed().length;
const feeds = birdwatch.feed() ? birdwatch.feed().length : 0;
const feedsFromLists = birdwatch.feedsFromList() ? birdwatch.feedsFromList().length : 0;
const refreshSeconds = birdwatch.options.refreshTime;
const refreshMinutes = Math.round(refreshSeconds / 60);
const cache = `${birdwatch.options.cacheDir}/cached_tweets.json`;
Expand All @@ -13,6 +14,7 @@ module.exports.logStartMessage = function (refreshTime, birdwatch) {
console.log(chalk.cyan('| '));
console.log(`${chalk.cyan('|')} Running Birdwatch ${chalk.gray(vers)}`);
console.log(`${chalk.cyan('|')} ${chalk.gray(' Monitoring Feeds: ')} ${chalk.white(feeds)}`);
console.log(`${chalk.cyan('|')} ${chalk.gray(' Monitoring Twitter Lists: ')} ${chalk.white(feedsFromLists)}`);
console.log(`${chalk.cyan('|')} ${chalk.gray(' Refresh Time: ')} ${chalk.white(refreshSeconds)} secs (${refreshMinutes} min)`);
console.log(`${chalk.cyan('|')} ${chalk.gray(' Cache File: ')} ${chalk.white(cache)}`);

Expand Down

0 comments on commit fe9deb3

Please sign in to comment.