mirror of
https://github.com/grafana/grafana.git
synced 2025-01-16 19:52:33 -06:00
fix query over live error - getQueryData should wait for centrifuge to initialize (#43880)
This commit is contained in:
parent
6b70e1af76
commit
3ca3b7f432
@ -209,6 +209,9 @@ export class CentrifugeService implements CentrifugeSrv {
|
||||
* Since the initial request and subscription are on the same socket, this will support HA setups
|
||||
*/
|
||||
getQueryData: CentrifugeSrv['getQueryData'] = async (options) => {
|
||||
if (!this.centrifuge.isConnected()) {
|
||||
await this.connectionBlocker;
|
||||
}
|
||||
return this.centrifuge.namedRPC('grafana.query', options.body);
|
||||
};
|
||||
|
||||
|
@ -143,7 +143,8 @@ export function runRequest(
|
||||
}),
|
||||
// handle errors
|
||||
catchError((err) => {
|
||||
console.error('runRequest.catchError', err);
|
||||
const errLog = typeof err === 'string' ? err : JSON.stringify(err);
|
||||
console.error('runRequest.catchError', errLog);
|
||||
return of({
|
||||
...state.panelData,
|
||||
state: LoadingState.Error,
|
||||
|
Loading…
Reference in New Issue
Block a user