1.0.1 • Published 5 years ago

@dotdeeka/rxjs-schedule-retry v1.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

RxJS Schedule Retry Build Status

This is a third party RxJS 6 operator to schedule retries at variable intervals, a "backoff retry".

Example:

import { scheduleRetry } from '@dotdeeka/rxjs-schedule-retry';
import 'rxjs/add/operator/let';

// lets assume someObservable$ is in scope somewhere and it is of type Observable<any>
someObservable$
  .pipe(scheduleRetry(300, 500, 800)
  .subscribe(
    () => console.log('next called'),
    () => console.log('error called'),
    () => console.log('complete called')
  );

In the above example if someObservable$ emits an error the first time through, scheduleRetry will wait 300 milliseconds and try it again. If it fails again it'll wait another 500 milliseconds and try again, same thing if it fails again, it'll wait 800ms and try again.

If at any point the observable is successful scheduleRetry will stop retrying and call next. If scheduleRetry gets to the end of the retry schedule and it hasn't been successful it will error and give you a chance to handle that error.

1.0.1

5 years ago

1.0.0

5 years ago

0.2.2

6 years ago

0.2.2-0

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago