Skip to content

dbworker: Add exponential backoff to retry mechanism

Created by: mrnugget

We currently only support setting a RetryAfter: time.Duration option. It would be nice if we could have exponential backoff.

Maybe the easiest way would be to provide a slice of durations:

RetryAfterDurations: []time.Duration{1*time.Second, 2*time.Second, 30*time.Second, 60*time.Second, ...}

That is then passed to the SQL and indexed by the num_resets column. Or something like that.