Skip to content

RFC: Add RetryAfter to dbworker.StoreOptions

Warren Gifford requested to merge mrn/worker-retry-after into main

Created by: mrnugget

In campaigns we need the ability to retry jobs multiple times. (See https://github.com/sourcegraph/sourcegraph/issues/12700#issuecomment-671798531 for additional context.)

This is what I think is the easiest-to-understand and simplest solution.

I did have another solution that involved a PreDequeue hook (that returned the custom conditions you see here now) and boolean in the StoreOptions to switch between AND'ing or OR'ing the custom conditions to the selectCandidateQuery.

This felt a bit hacky. It was less code, but also easier to miss and misudnerstand.

What do you think of this?

Merge request reports

Loading