@grafana/async-query-data
Advanced tools
Comparing version 0.1.9 to 0.1.10
@@ -23,2 +23,4 @@ import { LoadingState } from '@grafana/data'; | ||
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); | ||
const DELAY_INTERVAL_MS = 10; | ||
const MAX_NEXT_REQUEST_DELAY = 1e4 / DELAY_INTERVAL_MS; | ||
function getRequestLooper(req, options) { | ||
@@ -53,3 +55,3 @@ return new Observable((subscriber) => { | ||
} | ||
nextRequestDelay = nextRequestDelay * 2 > 10 ? 10 : nextRequestDelay * 2; | ||
nextRequestDelay = nextRequestDelay * 2 > MAX_NEXT_REQUEST_DELAY ? MAX_NEXT_REQUEST_DELAY : nextRequestDelay * 2; | ||
} else { | ||
@@ -75,3 +77,3 @@ loadingState = LoadingState.Done; | ||
nextQuery = void 0; | ||
}, nextRequestDelay * 1e3); | ||
}, nextRequestDelay * DELAY_INTERVAL_MS); | ||
} else { | ||
@@ -78,0 +80,0 @@ subscriber.complete(); |
@@ -823,2 +823,4 @@ 'use strict'; | ||
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b)); | ||
const DELAY_INTERVAL_MS = 10; | ||
const MAX_NEXT_REQUEST_DELAY = 1e4 / DELAY_INTERVAL_MS; | ||
function getRequestLooper(req, options) { | ||
@@ -853,3 +855,3 @@ return new rxjs.Observable((subscriber) => { | ||
} | ||
nextRequestDelay = nextRequestDelay * 2 > 10 ? 10 : nextRequestDelay * 2; | ||
nextRequestDelay = nextRequestDelay * 2 > MAX_NEXT_REQUEST_DELAY ? MAX_NEXT_REQUEST_DELAY : nextRequestDelay * 2; | ||
} else { | ||
@@ -875,3 +877,3 @@ loadingState = data.LoadingState.Done; | ||
nextQuery = void 0; | ||
}, nextRequestDelay * 1e3); | ||
}, nextRequestDelay * DELAY_INTERVAL_MS); | ||
} else { | ||
@@ -878,0 +880,0 @@ subscriber.complete(); |
{ | ||
"name": "@grafana/async-query-data", | ||
"version": "0.1.9", | ||
"version": "0.1.10", | ||
"description": "Async query support for Grafana", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
272027
2271