exponential-backoff-retry
v1.0.2
Published
It is simple exponential backoff retry algorithm implementation.
Downloads
293
Readme
Exponential Backoff Retry
It is simple exponential backoff retry algorithm implementation.
Getting Started
- Execute function 'functionToExecuteInBackoffRetry' with exponential retry.
import { exponentialBackoffRetry } from 'exponential-backoff-retry';
exponentialBackoffRetry(async () => functionToExecuteInBackoffRetry())
.then(result => {})
.catch(error => {});
- Execute function 'functionToExecuteInBackoffRetry' with exponential retry with max attempt as 100.
import { exponentialBackoffRetry, ExponentialBackoffRetryConfig } from 'exponential-backoff-retry';
exponentialBackoffRetry(async () => functionToExecuteInBackoffRetry(), new ExponentialBackoffRetryConfig(100))
.then(result => {})
.catch(error => {});