[SCM] ci-tooling packaging branch, master, updated. 309c5fda202cc9fcc9e57d22cc02150a1169e79c

Harald Sitter apachelogger-guest at moszumanska.debian.org
Tue Sep 15 10:23:23 UTC 2015


Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=309c5fd

The following commit has been merged in the master branch:
commit 309c5fda202cc9fcc9e57d22cc02150a1169e79c
Author: Harald Sitter <sitter at kde.org>
Date:   Tue Sep 15 12:23:17 2015 +0200

    add parameter to debug retry fails
---
 lib/retry.rb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/retry.rb b/lib/retry.rb
index 4d05f1f..d7da9f6 100644
--- a/lib/retry.rb
+++ b/lib/retry.rb
@@ -6,12 +6,14 @@ module Retry
   # @param tries [Integer] amount of tries
   # @param errors [Array<Object>] errors to rescue
   # @param sleep [Integer, nil] seconds to sleep between tries
+  # @param name [String, 'unknown'] name of the action (debug when not silent)
   # @yield yields to block which needs retrying
-  def retry_it(times: 1, errors: [StandardError], sleep: nil, silent: false)
+  def retry_it(times: 1, errors: [StandardError], sleep: nil, silent: false,
+               name: 'unknown')
     yield
     rescue *errors => e
       raise e if (times -= 1) == 0
-      print "Error on job #{name} :: #{e}
" unless silent
+      print "Error on retry_it(#{name}) :: #{e}
" unless silent
       Kernel.sleep(sleep) if sleep
       retry
   end

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list