-
-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility with Rails 5 #174
Conversation
Mayby I missed something, but works for me. |
hi @avokhmin Because of the indentation changes, it's kind of hard to see the changes to make it compatible with Rails 5, could you update your PR to only include the changes Shoryuken needs for Rails 5, skipping the indentation changes? Is your change also compatible with Rails 4? |
No( They break the back compatibility (see https://github.com/rails/rails/pull/19295/files#diff-fa86cbc86dd18818def18324430d4396R15 for example) But we can add hook: call class methods from instance methods. |
Add https://github.com/phstc/shoryuken/pull/174/files?w=1 |
To expand on what @avokhmin said, something like this will probably be enough to provide cross-compatibility for Rails 4 and 5: class ShoryukenAdapter
class << self
def instance
@instance ||= new
end
def enqueue(job)
instance.enqueue(job)
end
def enqueue_at(job, timestamp)
instance.enqueue(job, timestamp)
end
end
end |
TIL ^ tks @nickpearson
|
👍 |
PS: maybe try to add the
|
hi @avokhmin interesting. I've just created the issue on the Rails repo, let's see how it goes. |
Perfect! Let's wait that they will say |
Hey @phstc, I believe this broke the compatibility with Shoryuken::Later that was overriding the enqueue_at class instance to provide a means to start jobs after 15minutes How can I fix SHoryuken::Later to make it work with the new version of Shoryuken ? |
Hi @Startouf I think you only need to remove this, as cc/ @joekhoobyar |
According to rails/rails#19295
Fixed: