Closed aulvi closed 8 years ago
You should read our style guide.
The github-stats.js
file doesn't belong in the scripts
directory, since it has exports and won't do anything if run directly. This logic should just be implemented in lib/service/github.js
.
Based on discussion in IRC just now, we'll use a long running script instead of a cron job. We'll process one plugin per minute, which should allow us to process all plugins in one day right now.
update-plugin-stats.js is the main entry point, this should be called via cron.
github-stats.js simply takes a Plugins object and returns an updated Plugins object with new 'watchers' and 'forks' data.