[Uptime] Prevent duplicate requests on load for index status (#70585)
This commit is contained in:
parent
97ad58c529
commit
169147ba8c
1 changed files with 2 additions and 2 deletions
|
@ -4,13 +4,13 @@
|
||||||
* you may not use this file except in compliance with the Elastic License.
|
* you may not use this file except in compliance with the Elastic License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { takeLatest } from 'redux-saga/effects';
|
import { takeLeading } from 'redux-saga/effects';
|
||||||
import { indexStatusAction } from '../actions';
|
import { indexStatusAction } from '../actions';
|
||||||
import { fetchIndexStatus } from '../api';
|
import { fetchIndexStatus } from '../api';
|
||||||
import { fetchEffectFactory } from './fetch_effect';
|
import { fetchEffectFactory } from './fetch_effect';
|
||||||
|
|
||||||
export function* fetchIndexStatusEffect() {
|
export function* fetchIndexStatusEffect() {
|
||||||
yield takeLatest(
|
yield takeLeading(
|
||||||
indexStatusAction.get,
|
indexStatusAction.get,
|
||||||
fetchEffectFactory(fetchIndexStatus, indexStatusAction.success, indexStatusAction.fail)
|
fetchEffectFactory(fetchIndexStatus, indexStatusAction.success, indexStatusAction.fail)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue