Skip to content

Support variable backoff on retry #4

@benbuckman

Description

@benbuckman

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions