Created
August 4, 2023 16:13
-
-
Save pierrickouw/9245507a5caa9777694ace7211112118 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper.define_method(:sidekiq_retry_in_block) do | |
lambda do |count, exception, jobhash| | |
wrapped_class = jobhash['wrapped']&.safe_constantize | |
if wrapped_class.method_defined?(:sidekiq_retry_in_block) | |
return wrapped_class.sidekiq_retry_in_block&.call(count, exception, jobhash) | |
end | |
nil | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment