Merge pull request #1675 from nasa/limit-example-telemetry-response-sizes

[Example] Limit telemetry responses to 5000 records
This commit is contained in:
Deep Tailor 2017-08-16 10:34:24 -07:00 committed by GitHub
commit ae461f71b4
2 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@
var data = [];
for (; nextStep < end; nextStep += step) {
for (; nextStep < end && data.length < 5000; nextStep += step) {
data.push({
utc: nextStep,
yesterday: nextStep - 60*60*24*1000,

View File

@ -79,7 +79,7 @@ define([
var start = options.start;
var end = options.end;
var data = [];
while (start < end) {
while (start < end && data.length < 5000) {
data.push(pointForTimestamp(start));
start += 5000;
}