MCPcopy Create free account
hub / github.com/apache/arrow / with_retry

Method with_retry

dev/release/binary-task.rb:446–467  ·  view source on GitHub ↗
(max_n_retries, target)

Source from the content-addressed store, hash-verified

444 end
445
446 def with_retry(max_n_retries, target)
447 n_retries = 0
448 begin
449 yield
450 rescue Net::OpenTimeout,
451 OpenSSL::OpenSSLError,
452 SocketError,
453 SystemCallError,
454 Timeout::Error,
455 Error => error
456 n_retries += 1
457 if n_retries <= max_n_retries
458 $stderr.puts
459 $stderr.puts("Retry #{n_retries}: #{target}: " +
460 "#{error.class}: #{error.message}")
461 close
462 retry
463 else
464 raise
465 end
466 end
467 end
468
469 def with_read_timeout(timeout)
470 current_timeout, @current_timeout = @current_timeout, timeout

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected