-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
I came across your library which looks very helpful for my use case. I have an API that I would like to poll regularly, but backoff when errors occur. I'm trying to figure out how I can incorporate retryBackoff into that loop, but I'm seeing strange side effects where previous iterations are not being unsubscribed.
this.poll$.pipe(
switchMap(() => this.backend.callApi()),
retryBackoff(
{
initialInterval: 500,
maxInterval: 5000,
resetOnSuccess: true,
}
),
tap(() => $poll.next())
).subscribe(
response => console.log('successful response'),
error => console.log(`error: ${error}`)
);
Metadata
Metadata
Assignees
Labels
No labels