[Uptime] Prevent duplicate requests on load for index status (#70585)

This commit is contained in:
Shahzad 2020-07-03 10:24:15 +02:00 committed by GitHub
parent 97ad58c529
commit 169147ba8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,13 +4,13 @@
* 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 { fetchIndexStatus } from '../api';
import { fetchEffectFactory } from './fetch_effect';
export function* fetchIndexStatusEffect() {
yield takeLatest(
yield takeLeading(
indexStatusAction.get,
fetchEffectFactory(fetchIndexStatus, indexStatusAction.success, indexStatusAction.fail)
);