Created
September 9, 2018 17:42
-
-
Save KamMif/8d011b9bf6a200042d740ab23792039d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function* RequestData() { | |
try { | |
yield put(requestData()); | |
while (true) { | |
yield call(delay, 60000); | |
const data = yield call(fetchDataStatus); | |
if (data.res) { | |
yield put(requestDataSuccess(data.resp)); | |
} | |
} | |
} | |
catch (e) { | |
console.log('Error: ', e); | |
yield put(requestDataFailed(e.message)); | |
console.log('Data dashboard error:', e) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment