Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support variable backoff on retry #4

Open
benbuckman opened this issue Jul 15, 2016 · 0 comments
Open

Support variable backoff on retry #4

benbuckman opened this issue Jul 15, 2016 · 0 comments

Comments

@benbuckman
Copy link

When a job fails currently, it has a backoff of 2^count seconds.

return time.Now().UTC().Add(time.Duration(math.Pow(2, float64(backoff))) * time.Second)

Sometimes it's useful to wait much longer, like 30 seconds between runs.
It would be nice if the base (2) were variable per job in the database. For example, setting it to 5 would make the backoff be 5s, 25s, 125s, etc.
(Maybe the ^count exponent should also be variable? But that would be harder to implement and probably not necessary.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant