Skip to content

Question regarding retries on interrupt #1657

@Rammanor

Description

@Rammanor

Hi,
we have this config:

include GoodJob::ActiveJobExtensions::InterruptErrors
retry_on GoodJob::InterruptError, wait: 2.minutes, attempts: 2

From the documentation:
"If you need more control over interrupt-caused retries, include the GoodJob::ActiveJobExtensions::InterruptErrors extension in your job class. When an interrupted job is retried, the extension will raise a GoodJob::InterruptError exception within the job, which allows you to use Active Job's retry_on and discard_on to control the behavior of the job."

Does that mean that the second time the job is picked the worker only raises the interrupt error but won't run the job?
1st attempt -> worker dies
2nd attempt -> worker raises error

Does GoodJob need a minimum of 3 attempts to re-run the job in this case?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Inbox

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions