Granular retry logic

retry: { maxAttempts: 168, // Total attempts for 7 days factor: 1, // No exponential backoff randomize: true, // Still randomize within the given interval minTimeoutInMs: attempt => { if (attempt <= 24) { // For the first 24 attempts (first day), retry every hour return 3_600_000; // 1 hour in milliseconds } else { // After the first day, retry once every 24 hours return 24  3_600_000; // 24 hours in milliseconds } }, maxTimeoutInMs: attempt => { if (attempt <= 24) { // For the first 24 attempts (first day), retry every hour return 3_600_000; // 1 hour in milliseconds } else { // After the first day, retry once every 24 hours return 24  3_600_000; // 24 hours in milliseconds } } }

This would allow truly custom retry logic.

Where you perhaps the first 24 hours want to retry more frequently and then just once a day for a certain interval.

Upvoters
Status

In Review

Board

πŸ’‘ Feature Request

Date

Over 1 year ago

Author

Olle Bergkvist

Subscribe to post

Get notified by email when there are changes.