Skip to content

Commit

Permalink
Fix a bug where user can accidentally cause excessive API calls to be…
Browse files Browse the repository at this point in the history
… made, resulting in Nightscout consuming a huge amount of resources in the hosting environment (and the API calls probably failing)
  • Loading branch information
sulkaharo committed Mar 7, 2019
1 parent cb558a3 commit a93a79e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ if (!module.parent) {
, endpoint: readENV('NS', 'https://' + readENV('WEBSITE_HOSTNAME'))
};
var interval = readENV('SHARE_INTERVAL', 60000 * 2.5);
interval = Math.max(60000, interval);
var fetch_config = { maxCount: readENV('maxCount', 1)
, minutes: readENV('minutes', 1440)
};
Expand Down

0 comments on commit a93a79e

Please sign in to comment.