timgit / pg-boss

Queueing jobs in Postgres from Node.js like a boss
MIT License
2.15k stars 160 forks source link

Feature request: maxRetryDelay #520

Open danilofuchs opened 2 weeks ago

danilofuchs commented 2 weeks ago

It would be nice to have an option to limit exponential backoff to some degree or duration.

For instance, we have a process with high likelihood of resolving within 10 seconds but may take up to 30 minutes. If we set retryDelay to 10s and turn on exponentialBackoff, the attempts would roughly happen with these delays:

At this point, the delay is too large and the user has a degraded experience

If we configured a maxRetryDelay of 80 seconds, the backoff algorithm would be capped to a reasonable duration