We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 822b1e9 commit 6a22519Copy full SHA for 6a22519
lib/resque/job.rb
@@ -216,9 +216,9 @@ def failure_hooks
216
end
217
218
def run_failure_hooks(exception)
219
- unless @failure_hooks_already_ran
220
- job_args = args || []
221
- failure_hooks.each { |hook| payload_class.send(hook, exception, *job_args) }
+ begin
+ failure_hooks.each { |hook| payload_class.send(hook, exception, *Array.wrap(args)) } unless @failure_hooks_already_ran
+ ensure
222
@failure_hooks_already_ran = true
223
224
0 commit comments