Re-poll doFetchFeaturedUris every so often #1090
1 changed files with 7 additions and 0 deletions
|
@ -70,6 +70,13 @@ export function doResolveUri(uri) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doFetchFeaturedUris() {
|
export function doFetchFeaturedUris() {
|
||||||
|
return dispatch => {
|
||||||
|
dispatch(doFetchFeaturedUrisNow());
|
||||||
|
setInterval(() => dispatch(doFetchFeaturedUrisNow()), 40000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function doFetchFeaturedUrisNow() {
|
||||||
|
|||||||
return dispatch => {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.FETCH_FEATURED_CONTENT_STARTED,
|
type: ACTIONS.FETCH_FEATURED_CONTENT_STARTED,
|
||||||
|
|
Loading…
Add table
Reference in a new issue
Setting an interval like this is absolutely correct, but it would be better if you found the place that originally triggers
doFetchFeaturedUris
and set the interval there instead of creating two actions.