How to use the retryWhen function from rxjs
Find comprehensive JavaScript rxjs.retryWhen code examples handpicked from public code repositorys.
GitHub: openforis/sepal
3 4 5 6 7 8 9 10 11 12
const EXCHANGE = 'sepal.topic' const RETRY_DELAY_MS = 10000 const retry = delay => pipe( retryWhen(error$ => error$.pipe( mergeMap( error => { log.warn(`Reconnecting in ${delay}ms after error: ${error}`)
45
178
34
GitHub: openforis/sepal
120 121 122 123 124 125 126 127 128 129
return of(e) } else { return throwError(() => e) } }), retryWhen(function (error$) { return zip( error$, range(1, retries + 1) ).pipe(
45
178
34