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

deliver_later doesn't work with 2.0 and rails 4.2.5 #163

Closed rubydesign closed 8 years ago

rubydesign commented 8 years ago

Great tool, but small version problem, maybe ?

so, just following the readme (which is silent on deliver_later ) i get NoMethodError - undefined method `async' for #ActiveJob::QueueAdapters::SuckerPunchAdapter::JobWrapper:0x007f8e1b98f390:

when sending a mail with deliver_later

only downgrading to 1.6 fixes this. Possibly the 2.0 needs a rails 5 dependency ?

Torsten

rubydesign commented 8 years ago

Ok, re-reading (the 4th time) i see a section on backward compatibility. Which i didn't read before since i have a new installation.

But doing the require async does the trick for sp 2.0

So moving that section to the rails section and making it more explicit would do it

szyablitsky commented 8 years ago

@brandonhilkert Is there any chance to backport 2.0 compatibility into ActiveJob version > 4.2.5.1 and < 5.x

rubydesign commented 8 years ago

isn't that just a matter of checking the rails version in the main required file and requiring the async if needed

brandonhilkert commented 8 years ago

Backporting something like that is up to the Rails core team. Unfortunately, I don't have control over it. I added back anote about the change to the ActiveJob section.

szyablitsky commented 8 years ago

@brandonhilkert thank you, now it is clear.