-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add perform_after_commit
to ActiveJob jobs?
#27
Comments
Hey! Thanks for the suggestion. I wonder maybe something can be done globally in ActiveJob configuration level, similar to Sidekiq's That way |
Ohhh, thank you, I didn’t know about this setting. 😍 I’ll try it out as soon as I can! I think tying to Sidekiq specifically makes more sense since not all ActiveJob backends would benefit from using an We could close this issue but before that perhaps we could document Sidekiq’s beta setting in this README? I’d be happy to submit a PR if you want. |
Btw, Sidekiq's setting isn't beta anymore since 7.0, but you have to enable it explicitly. |
Unfortunately using ActiveJob+Sidekiq the option seemed to have no effect on my side. I have opted to override module AfterCommitableJob
extend ActiveSupport::Concern
class_methods do
def perform_later(...)
AfterCommitEverywhere.after_commit do
super
end
end
end
end |
Since it is a common use to use
after_commit
around ActiveJob calls (like in #19), would it make sense to add to this gem aperform_after_commit
method to all ActiveJob jobs?I use the following concern in my app:
Would more people benefit from including this in
after_commit_everywhere
directly?The text was updated successfully, but these errors were encountered: