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

Removing ∞ silent retries of Bulkrax::ImportWorkJob #692

Merged
merged 1 commit into from
Dec 19, 2022
Merged

Conversation

jeremyf
Copy link
Contributor

@jeremyf jeremyf commented Dec 19, 2022

Prior to this commit, when we encountered a
Bulkrax::CollectionsCreatedError, we would reschedule the same job with a 1 minute delay. However, if the underlying issue was never resolved, we would continually reschedule without fanfare this failing job.

With this commit, we provide 3 logged reschedules, then if that fails we raise an exception break the infinite cycle. By breaking the cycle, then the upstream Sidekiq handler can determine if it should be thrown into the Retry queue (where the jobs that raise exceptions go).

We discovered this in Adventist watch 100 or scheduled jobs run very fast, and apparently continually rescheduling themselves.

Closes #691

@kirkkwang kirkkwang added the minor-ver for release notes label Dec 19, 2022
@jeremyf jeremyf added the patch-ver for release notes label Dec 19, 2022
@kirkkwang kirkkwang removed the minor-ver for release notes label Dec 19, 2022
Prior to this commit, when we encountered a
`Bulkrax::CollectionsCreatedError`, we would reschedule the same job
with a 1 minute delay.  However, if the underlying issue was never
resolved, we would continually reschedule without fanfare this failing
job.

With this commit, we provide 3 logged reschedules, then if that fails we
raise an exception break the infinite cycle.  By breaking the cycle,
then the upstream Sidekiq handler can determine if it should be thrown
into the `Retry` queue (where the jobs that raise exceptions go).

We discovered this in Adventist watch 100 or scheduled jobs run very
fast, and apparently continually rescheduling themselves.

Closes #691
@jeremyf jeremyf merged commit d36cf36 into main Dec 19, 2022
jeremyf added a commit to scientist-softserv/adventist-dl that referenced this pull request Dec 19, 2022
From the Bulkrax pull request:

> Prior to this commit, when we encountered a
> `Bulkrax::CollectionsCreatedError`, we would reschedule the same job
> with a 1 minute delay.  However, if the underlying issue was never
> resolved, we would continually reschedule without fanfare this failing
> job.
>
> With this commit, we provide 3 logged reschedules, then if that fails
> we raise an exception break the infinite cycle.  By breaking the
> cycle, then the upstream Sidekiq handler can determine if it should be
> thrown into the `Retry` queue (where the jobs that raise exceptions
> go).
>
> We discovered this in Adventist watch 100 or scheduled jobs run very
> fast, and apparently continually rescheduling themselves.

Related to:

- samvera/bulkrax#692
- samvera/bulkrax#691
@alishaevn
Copy link
Contributor

as info, #610 was created for this purpose. at a later time we should handle this type of thing the same way throughout the entire app.

@alishaevn alishaevn linked an issue Dec 19, 2022 that may be closed by this pull request
4 tasks
@jeremyf jeremyf deleted the jeremyf---691 branch March 16, 2023 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix patch-ver for release notes
Projects
None yet
4 participants