Browse files

Another clarification.

  • Loading branch information...
1 parent 36618ba commit 832919e109374643fa541b08efca05b0d124d818 Evan Weaver committed Oct 6, 2010
Showing with 3 additions and 9 deletions.
  1. +3 −9 lib/kestrel/client/transactional.rb
View
12 lib/kestrel/client/transactional.rb
@@ -81,17 +81,11 @@ def retry(item = nil)
return unless job
+ queue = queue_for_last_job
job.retries += 1
- if job.retries == 1
- client.set(current_queue + "_errors", job)
- close_transaction(current_queue)
- elsif job.retries < @max_retries
- client.set(current_queue + "_errors", job)
- close_transaction(current_queue + "_errors")
- else
- close_transaction(current_queue + "_errors")
- end
+ client.set(current_queue + "_errors", job) if job.retries < @max_retries
+ close_transaction(queue)
# No longer have an active job
@current_queue = @job = nil

0 comments on commit 832919e

Please sign in to comment.