brandonhilkert / sucker_punch

Sucker Punch is a Ruby asynchronous processing library using concurrent-ruby, heavily influenced by Sidekiq and girl_friday.
MIT License
2.65k stars 114 forks source link

2.0 isn't compatible with ActiveJob anymore. #165

Closed byroot closed 8 years ago

byroot commented 8 years ago

While bumping gems I noticed:

NoMethodError: undefined method `async' for #<ActiveJob::QueueAdapters::SuckerPunchAdapter::JobWrapper:0x007fc18f11aca8>
activejob-4.2.5.1/lib/active_job/queue_adapters/sucker_punch_adapter.rb:23:in `enqueue'
activejob-4.2.5.1/lib/active_job/enqueuing.rb:71:in `block in enqueue'
activesupport-4.2.5.1/lib/active_support/callbacks.rb:117:in `call'
activesupport-4.2.5.1/lib/active_support/callbacks.rb:117:in `call'
activesupport-4.2.5.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
activesupport-4.2.5.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
activesupport-4.2.5.1/lib/active_support/callbacks.rb:343:in `call'
activesupport-4.2.5.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple'
activejob-4.2.5.1/lib/active_job/logging.rb:14:in `call'
activejob-4.2.5.1/lib/active_job/logging.rb:14:in `block (3 levels) in <module:Logging>'
activejob-4.2.5.1/lib/active_job/logging.rb:43:in `block in tag_logger'
activesupport-4.2.5.1/lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport-4.2.5.1/lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport-4.2.5.1/lib/active_support/tagged_logging.rb:68:in `tagged'
activejob-4.2.5.1/lib/active_job/logging.rb:43:in `tag_logger'
activejob-4.2.5.1/lib/active_job/logging.rb:13:in `block (2 levels) in <module:Logging>'
activesupport-4.2.5.1/lib/active_support/callbacks.rb:441:in `instance_exec'
activesupport-4.2.5.1/lib/active_support/callbacks.rb:441:in `block in make_lambda'
activesupport-4.2.5.1/lib/active_support/callbacks.rb:342:in `call'
activesupport-4.2.5.1/lib/active_support/callbacks.rb:342:in `block in simple'
activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in `call'
activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in `block in around'
activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
activesupport-4.2.5.1/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
activesupport-4.2.5.1/lib/active_support/callbacks.rb:778:in `_run_enqueue_callbacks'
activesupport-4.2.5.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
activejob-4.2.5.1/lib/active_job/enqueuing.rb:67:in `enqueue'
activejob-4.2.5.1/lib/active_job/enqueuing.rb:17:in `perform_later'

Since it's a major bump it's likely expected, and it should probably be fixed on Rails side, but I figured it would be good to mention it here.

byroot commented 8 years ago

Ok, my bad it's already fixed for Rails 5: https://github.com/rails/rails/pull/23284

brandonhilkert commented 8 years ago

Also mentioned here for older versions of Rails: https://github.com/brandonhilkert/sucker_punch#active-job

byroot commented 8 years ago

Ouch, I really feel bad about that one. Sorry for jumping the gun.

brandonhilkert commented 8 years ago

hahaha, it's ok :) Cheers!