Skip to content

Instantly share code, notes, and snippets.

@nulldef
Created October 16, 2023 13:44
Show Gist options
  • Save nulldef/e0ef87d55bc49aa9605d54a76c563a88 to your computer and use it in GitHub Desktop.
Save nulldef/e0ef87d55bc49aa9605d54a76c563a88 to your computer and use it in GitHub Desktop.
Run sidekiq job only after commit
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