Closed drueck closed 8 years ago
Rails hasn't been updated to work with 2.0.0. That's on my list once it's gets out of beta.
Oh, I see. I didn't realize the sucker punch adapter was actually part of Rails and not this project. I guess I should have dug into the code a bit first. Thanks for the quick reply!
Side note: It seems kind of unfortunate that all the ActiveJob adapters live in the Rails codebase instead of in their own projects or separate adapter projects. Seems like a shame for people to have to wait for a new release of Rails to use a newer version of an ActiveJob compatible provider. Interesting...
It's definitely not ideal, but it is their way of making sure the whole thing doesn't get out of control, which as a user of Rails, I can appreciate.
Curated list of approved quality adapters, I guess. Yeah, that makes sense at that level. I guess that'll just give me one more reason to update to Rails 5 soon. ;) Thanks for your work on this! Much appreciated!
If you use the "Backward Compatibility" feature mentioned in the README, require 'sucker_punch/async_syntax'
, that may allow you to use ActiveJob with the v2 beta.
@jdantonio Good point! I tried that and my ActiveJob based tasks (emails and background image processing) are now working with 2.0.0.beta1. It might make sense to add a comment to the README about using that backward compatibility feature when using it with ActiveJob pre-Rails 5?
Just to confirm this... The new sucker_punch should work fine with an older version of Rails (ie 4.0.X) if it's used directly and not implemented through ActiveJob, correct?
@openface Yes.
@drueck Added note here
Perfect. Great clarification for other users looking to upgrade.
@drueck This is handled in Rails now - https://github.com/rails/rails/pull/23284
Nice! I checked out the commit. Looks like celluloid was still being required. Someone just commented asking about it. Perhaps it was just a small oversight. Anyway, glad to see when I update to Rails 5 I'll be good to go!
I'm using
:sucker_punch
as myactive_job.queue_adapter
, and when I tried updating to2.0.0.beta1
, I got this error when trying to call#deliver_later
on one of my ActionMailer emails:Is there any change in how I need to configure SuckerPunch to work with ActiveJob and ActionMailer? Or has the SuckerPunchAdapter just not been updated for 2.0 yet?
Let me know if you'd like any more info. Thanks!