Add retry logic to workerutils
Created by: mrnugget
As we discussed in Slack: it would be great to have retry-functionality in the workerutils
package.
What would that look like? Handlers could return special errors that are "retryable" and if they are, the worker enqueues the job again.
Sketch:
err := handler.process(ctx, tx, record)
if err != nil && errcode.IsRetryable(err) {
EnqueueRetry(ctx, record)
}