aboutsummaryrefslogtreecommitdiffstats
path: root/app/services
diff options
context:
space:
mode:
authorRobert2017-07-27 07:41:41 +0200
committerRobert2017-07-27 07:41:41 +0200
commit96a6ae08191b465a91b285cf157223c0a898ed5d (patch)
treeaa45274f521b37fc3f5d12f03839f87273c4dbfb /app/services
parent9b97b8728a1d3714147591e4facacad097f2a155 (diff)
downloadchouette-core-96a6ae08191b465a91b285cf157223c0a898ed5d.tar.bz2
Refs: #3507@0.25h; Added information to retry callbacks in RetryService (for logging)
Diffstat (limited to 'app/services')
-rw-r--r--app/services/retry_service.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/retry_service.rb b/app/services/retry_service.rb
index 0b8f5447b..55e2585ef 100644
--- a/app/services/retry_service.rb
+++ b/app/services/retry_service.rb
@@ -11,8 +11,8 @@ class RetryService
def execute &blk
status, result = execute_protected blk
return [status, result] if status == :ok
- @intervals.each do | interval |
- @failure_callback.try(:call)
+ @intervals.each_with_index do | interval, retry_count |
+ @failure_callback.try(:call, result, retry_count.succ)
sleep interval
status, result = execute_protected blk
return [status, result] if status == :ok