Created
October 16, 2023 13:44
-
-
Save nulldef/e0ef87d55bc49aa9605d54a76c563a88 to your computer and use it in GitHub Desktop.
Run sidekiq job only after commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module SidekiqClientExtension | |
def raw_push(jobs) | |
DB.after_commit { super } | |
end | |
end | |
Sidekiq::Client.prepend(SidekiqClientExtension) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment