Skip to content
This repository has been archived by the owner on Jul 2, 2019. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Add REFRESH_RATE env var for configuring polling rate.
  • Loading branch information
nubs committed Feb 17, 2015
1 parent f245c67 commit 8f6bd70
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app.json
Expand Up @@ -17,6 +17,10 @@
"START_TIME": {
"description": "The time to start looking for npm packages. For example, \"5 hours ago\".",
"required": false
},
"REFRESH_RATE": {
"description": "The amount of time to wait between polls of NPM.",
"required": false
}
}
}
3 changes: 2 additions & 1 deletion server.js
Expand Up @@ -12,8 +12,9 @@ require('assert-dotenv')({}, function() {
var startTime = process.env.START_TIME ?
Date.parse(process.env.START_TIME) :
new Date();
var refreshRate = process.env.REFRESH_RATE || 30000;

var npm = new Npm({startTime: startTime});
var npm = new Npm({startTime: startTime, refreshRate: refreshRate});

var npmSlack = new NpmSlack({
npm: npm,
Expand Down

0 comments on commit 8f6bd70

Please sign in to comment.