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 99658f0 commit caf5e64
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 caf5e64

Please sign in to comment.