Sha256: 8317a3a43be89cd0eece4e6de0ab2bf5db8ad8d9af7f3c53815750a5a96e2530
Contents?: true
Size: 1.09 KB
Versions: 17
Compression:
Stored size: 1.09 KB
Contents
class ProconBypassMan::DeviceConnection::Command MAX_RETRY_COUNT = 3 # @return [void] def self.execute!(retry_count: 0) begin gadget, procon = ProconBypassMan::DeviceConnection::Executer.execute! rescue ProconBypassMan::DeviceConnection::TimeoutErrorInConditionalRoute if retry_count >= MAX_RETRY_COUNT ProconBypassMan::SendErrorCommand.execute(error: "リトライしましたが、接続できませんでした") raise ProconBypassMan::DeviceConnection::TimeoutError else ProconBypassMan::SendErrorCommand.execute(error: "接続に失敗したのでリトライします") end retry_count = retry_count + 1 retry rescue ProconBypassMan::DeviceConnection::NotFoundProconError => e raise rescue ProconBypassMan::SafeTimeout::Timeout raise ProconBypassMan::DeviceConnection::TimeoutError end ProconBypassMan::DeviceConnection::PreBypass.new(gadget: gadget, procon: procon).execute! ProconBypassMan::DeviceConnection::ProconSettingOverrider.new(procon: procon).execute! return [gadget, procon] end end
Version data entries
17 entries across 17 versions & 1 rubygems