socialpandas / sidekiq-superworker

Directed acyclic graphs of Sidekiq jobs
MIT License
438 stars 34 forks source link

Incompatible with Sidekiq 2.16 #4

Closed hnatt closed 10 years ago

hnatt commented 10 years ago

A change in Sidekliq's lib/client.rbbrakes your code

rails g sidekiq:superworker:install
.../gems/sidekiq-superworker-0.1.2/lib/sidekiq/client_ext.rb:5:in `alias_method': undefined method `normalize_item' for class `Class' (NameError)
SergeyKishenin commented 10 years ago

I hope that's the fix https://github.com/socialpandas/sidekiq-superworker/pull/5

hnatt commented 10 years ago

The exception on installation sure will be gone. But what will happen when somebody calls normalize_item after your patch applied? On Nov 16, 2013 11:13 AM, "Sergey Kishenin" notifications@github.com wrote:

I hope that's the fix #5https://github.com/socialpandas/sidekiq-superworker/pull/5

— Reply to this email directly or view it on GitHubhttps://github.com/socialpandas/sidekiq-superworker/issues/4#issuecomment-28622070 .

hnatt commented 10 years ago

Did a PR #6 that really fixes the bug (at least the tests ran OK), but requires updating dependencies.

tombenner commented 10 years ago

Thanks for catching this. We still need to support Sidekiq between 2.1.0 and 2.16.0, though.

It turns out that injecting a job's jid is natively supported by Sidekiq >=2.12.2, so we only need to patch in this support in versions prior to that, thus avoiding the need to include it at all in >=2.16.0.

I've done this in 561b16e1; it's available in Sidekiq Superworker 0.1.3.