opswalrus 1.0.109 → 1.0.111

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 771554c9f1009d75cfc50dfc89f056d15dc2c2eba3cd62768a3dd0d9efcbe73b
4
- data.tar.gz: 5a46bf2ec071c4d15651fb7b6ed774841eeb66ef81765c865c150bba0cc41a9f
3
+ metadata.gz: 1b629fa6175a8c5ec30dcb080ee9621d8819b219a84da27a913bbf1f5443a83b
4
+ data.tar.gz: 171a9eebe51bffba40b5e0f46bcf9ac0ec1ac8a49b59303e65e9eee036eb4f85
5
5
  SHA512:
6
- metadata.gz: 901241d170ce4d0b5273fd4f8609f00c77b22dcdcb7b54c0041c9b5ca913d7b87dc6198894ba0c47a0d7c36053701ae78932250b0cc1c627ec35969b933509ab
7
- data.tar.gz: a30d221e2fe11928562b646841777a6e3a21f04e57060d0411082f187628a09d53edfd26aba0681a981215692cac3eb7f9e1a6e2ed3a4d2b9083aa7736ed2279
6
+ metadata.gz: 84fc13a9fd1da13fcd2d86c1ce1570688352e20daa4e1c40c93cb625740d15b0cf383ca239445b82eadb764a23f5394732bed835441feae434ed8748bda41475
7
+ data.tar.gz: 112880cfd88527e824aca7cb6f7ae4c1ac7b6632791ffb4f3b58b46959f670b9900c9785fb52bf5b364f33cb4e40ac858b5318ee0c9b619f7430bc4a5d0c470f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- opswalrus (1.0.109)
4
+ opswalrus (1.0.111)
5
5
  activesupport (~> 7.0)
6
6
  bcrypt_pbkdf (~> 1.1)
7
7
  binding_of_caller (~> 1.0)
@@ -160,12 +160,12 @@ module OpsWalrus
160
160
  }
161
161
  end
162
162
 
163
- def autoretry(delay: 5, timeout: 300, &block)
163
+ def autoretry(delay: 5, timeout: 300, limit: 3, &block)
164
164
  attempts ||= 0
165
165
  attempts += 1
166
166
  block.call
167
167
  rescue RetriableRemoteInvocationError => e
168
- if attempts <= 3
168
+ if attempts <= limit
169
169
  reconnected = reconnect(delay, timeout)
170
170
  retry if reconnected
171
171
  end
@@ -44,11 +44,11 @@ module SSHKit
44
44
  rescue EOFError, Errno::EIO, Errno::ENOENT
45
45
  # puts "eof!"
46
46
  handle_data_for_stdout(output, cmd, buffer, stdin, true)
47
- stdout.close
47
+ stdout.close unless stdout.closed?
48
48
  rescue => e
49
49
  App.instance.error "closing PTY due to unexpected error: #{e.message}"
50
50
  handle_data_for_stdout(output, cmd, buffer, stdin, true)
51
- stdout.close
51
+ stdout.close unless stdout.closed?
52
52
  # puts e.message
53
53
  # puts e.backtrace.join("\n")
54
54
  end
@@ -65,6 +65,7 @@ module SSHKit
65
65
  # stderr_writer.close
66
66
  # output.log_command_data(cmd, :stderr, stderr_reader.read)
67
67
  cmd.exit_status = status.exitstatus
68
+ ensure
68
69
  output.log_command_exit(cmd)
69
70
  end
70
71
  # ensure
@@ -1,3 +1,3 @@
1
1
  module OpsWalrus
2
- VERSION = "1.0.109"
2
+ VERSION = "1.0.111"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opswalrus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.109
4
+ version: 1.0.111
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Ellis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-26 00:00:00.000000000 Z
11
+ date: 2024-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport