[SCM] ci-tooling packaging branch, master, updated. fb37a28cfea18c912cdc54050918ce5d4a74bbed
Harald Sitter
apachelogger-guest at moszumanska.debian.org
Wed Aug 19 08:11:40 UTC 2015
Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=a6d1841
The following commit has been merged in the master branch:
commit a6d1841d3017de8b935061a3069a6bee3c32f961
Author: Harald Sitter <sitter at kde.org>
Date: Wed Aug 19 10:10:46 2015 +0200
[lp] cover tokenized gets in a retry loop
for some reason launchpad tends to spas out as of late
---
lib/lp.rb | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/lib/lp.rb b/lib/lp.rb
index 5fb9024..7f83664 100644
--- a/lib/lp.rb
+++ b/lib/lp.rb
@@ -20,6 +20,7 @@ require 'json'
require 'ostruct'
require 'net/http'
require 'net/http/exceptions'
+require 'retry'
require 'thread'
require 'oauth'
@@ -128,9 +129,11 @@ module Launchpad
if token
# Token internally URIfies again without checking if it already has
# a URI, so simply give it a string...
- response = token.get(uri.to_s)
- fail Net::HTTPRetriableError.new(response.body, response) unless response.is_a? Net::HTTPSuccess
- return response.body
+ Retry.retry_it(times: 2, errors: OpenSSL::SSL::SSLError, sleep: 8) do
+ response = token.get(uri.to_s)
+ fail Net::HTTPRetriableError.new(response.body, response) unless response.is_a? Net::HTTPSuccess
+ return response.body
+ end
end
# Set cache control.
--
ci-tooling packaging
More information about the pkg-kde-commits
mailing list