[前][次][番号順一覧][スレッド一覧]

ruby-changes:52217

From: k0kubun <ko1@a...>
Date: Sat, 18 Aug 2018 11:04:50 +0900 (JST)
Subject: [ruby-changes:52217] k0kubun:r64425 (trunk): tool/downloader.rb: retry 500 from GitHub

k0kubun	2018-08-18 11:04:44 +0900 (Sat, 18 Aug 2018)

  New Revision: 64425

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64425

  Log:
    tool/downloader.rb: retry 500 from GitHub
    
    Unfortunately, GitHub may return 500 for temporary failure:
    https://travis-ci.org/ruby/ruby/builds/417246523

  Modified files:
    trunk/tool/downloader.rb
Index: tool/downloader.rb
===================================================================
--- tool/downloader.rb	(revision 64424)
+++ tool/downloader.rb	(revision 64425)
@@ -272,7 +272,7 @@ class Downloader https://github.com/ruby/ruby/blob/trunk/tool/downloader.rb#L272
     begin
       block.call
     rescue Errno::ETIMEDOUT, SocketError, OpenURI::HTTPError => e
-      raise if e.is_a?(OpenURI::HTTPError) && e.message !~ /^50[23] / # retry only 502, 503 for http error
+      raise if e.is_a?(OpenURI::HTTPError) && e.message !~ /^50[023] / # retry only 500, 502, 503 for http error
       times += 1
       if times <= max_times
         $stderr.puts "retrying #{e.class} (#{e.message}) after #{times ** 2} seconds..."

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]