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
NoMethodError: undefined method `check_for_orphans' for Sidekiq::Pro::SuperFetch:Class #4693
Comments
Yes, that API was never considered a public API so it was considered fair to refactor outside of a major version bump. I don't have an alternative API to suggest, do you still need to make that call at all? |
I'm not sure. I'll check with my team and see if we can restart workers on some sort of cadence to recover orphaned jobs. |
Is that the only mechanism to recover orphaned jobs? |
super_fetch's orphan recovery is triggered by process startup. Jobs are almost always lost on process crash or deploy, both of which lead to process startup. I'm not sure why someone wanted to run this periodically but you might want to double check their assumptions are true. |
Thanks for the quick response. Closing. |
@mperham this was intentional, we relied on that API because we run sidekiq on Google Cloud Platform preemptible instances, which have loose guarantees about uptime and may not have a fully clean shutdown procedure, so they're more prone to orphan jobs. In production, we found that relying on worker startup to scan for orphaned jobs was not regular/consistent enough and could cause multi-hour delay in picking up orphaned jobs. In our environment we need this delay to be minimized, so we explicitly added calls to this API to more regularly check for orphans. Definitely would be helpful to have an alternative here or to make that API public and supported. |
The equivalent updated API is: Sidekiq::Pro::SuperFetch.new(Sidekiq.options).check_for_orphans Try that. |
That works great, thanks much @mperham |
Note for anyone else who relies on this (internal) API: we upgraded from sidekiq-pro (5.3.1) to sidekiq-pro (5.5.1) and we had to update this to remove Sidekiq::Pro::SuperFetch.new(Sidekiq.options).check_for_orphans --> Sidekiq::Pro::SuperFetch.new(Sidekiq).check_for_orphans |
Ruby version: 2.6.5
Rails version: 6.0.3.3
Sidekiq / Pro / Enterprise version(s): 6.1.2, 5.2.0
We were calling this method explicitly in a cron job and recently updated our sidekiq-pro version:
We periodically check for orphaned jobs and re-enqueue them for Sidekiq. It appears that this method has disappeared in a recent version of Sidekiq Pro. Is there an alternative to this method? Was the refactor related to #4602? I can't search the history of Sidekiq Pro, as it's closed source.
Thanks in advance.
The text was updated successfully, but these errors were encountered: