Skip to content

Commit

Permalink
[monitoring] only start bulk uploader once (#31307)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbudz committed Feb 21, 2019
1 parent f25d526 commit ae40bc1
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@ export class BulkUploader {

// this is internal bulk upload, so filter out API-only collectors
const filterThem = _collectorSet => _collectorSet.getFilteredCollectorSet(c => c.ignoreForInternalUploader !== true);
this._fetchAndUpload(filterThem(collectorSet)); // initial fetch

if (this._timer) {
clearInterval(this._timer);
} else {
this._fetchAndUpload(filterThem(collectorSet)); // initial fetch
}

this._timer = setInterval(() => {
this._fetchAndUpload(filterThem(collectorSet));
}, this._interval);
Expand Down

0 comments on commit ae40bc1

Please sign in to comment.