ixti/sidekiq-throttled

Error fetching job: undefined method `retrieve_work' for Sidekiq::Throttled::Fetch:Class

arent-groebner opened this issue · 2 comments

I opened a ticket for the sidekiq project, but it appears to be a sidekiq-throttled issue. Please have a look here:

sidekiq/sidekiq/issues/4614

lenon commented

I had the same issue when I upgraded Sidekiq from 6.0.7 to 6.1.0.

As @mperham already said the internal API of sidekiq changed and it's a minor version update. 🤷‍♂️ Without any warranty for the fixup I tried to dig into this issue. Github compare helped a lot ( sidekiq/sidekiq@v6.0.7...v6.1.0 ) Basically its about this files:

  1. https://github.com/sensortower/sidekiq-throttled/blob/78dd7179672ea3ed7c6d838dab94386bb7e24a03/lib/sidekiq/throttled.rb#L65

So the fetch strategy init moved from the lib/sidekiq/processor.rb to lib/sidekiq/launcher.rb which is used by the sidekiq CLI. Before you where allowed to set a class Sidekiq.options[:fetch] = Sidekiq::Throttled::Fetch to setup a fetch strategy. Now you have to set an instance like sidekiq does in the lib/sidekiq/launcher.rb like options[:fetch] ||= BasicFetch.new(options).

So I build a simple fixup #85 which I currently test run. It looks OK, tests are passing. Keep in touch.