Skip to content

Commit 025245e

Browse files
author
elie
committed
do not use Array.wrap while running failure hooks
1 parent fc0e2db commit 025245e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/resque/job.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ def failure_hooks
217217

218218
def run_failure_hooks(exception)
219219
begin
220-
failure_hooks.each { |hook| payload_class.send(hook, exception, *Array.wrap(args)) } unless @failure_hooks_ran
220+
job_args = args || []
221+
failure_hooks.each { |hook| payload_class.send(hook, exception, *job_args) } unless @failure_hooks_ran
221222
ensure
222223
@failure_hooks_ran = true
223224
end

0 commit comments

Comments
 (0)