Skip to content

Commit

Permalink
change var name to @failure_hook_ran
Browse files Browse the repository at this point in the history
  • Loading branch information
hone committed May 31, 2012
1 parent c3627fc commit e7d3ec9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/resque/job.rb
Expand Up @@ -32,7 +32,7 @@ class Job
def initialize(queue, payload)
@queue = queue
@payload = payload
@failure_hooks_already_ran = false
@failure_hooks_ran = false
end

# Creates a job by placing it on a queue. Expects a string queue
Expand Down Expand Up @@ -217,9 +217,9 @@ def failure_hooks

def run_failure_hooks(exception)
begin
failure_hooks.each { |hook| payload_class.send(hook, exception, *Array.wrap(args)) } unless @failure_hooks_already_ran
failure_hooks.each { |hook| payload_class.send(hook, exception, *Array.wrap(args)) } unless @failure_hooks_ran
ensure
@failure_hooks_already_ran = true
@failure_hooks_ran = true
end
end
end
Expand Down

0 comments on commit e7d3ec9

Please sign in to comment.