aggkit 0.4.6.14358 → 0.4.6.15735
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/bin/aggwrap +13 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebad3e35bc1a22ff1edbafffa65997b48acd9dcaad0be0b39bed671de48ffc0d
|
4
|
+
data.tar.gz: 2eb0459988a4ebc218af91abee41e5c1a9bf47be9168d0c735805e2f17eb1582
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f69a33558cf182c5fde161103c5adb2ed0c92db43ff57113448087febb2349d5f4b1f375c86afa16948808f83ba0d08e83eaaf8985858dd7b5618dbfddd5a8d
|
7
|
+
data.tar.gz: e410f56200b71ff085aaa0a96cc84536c5abdfa5bb9ca28bc786df5caea44e3fbddfd69545465dd4ee941340b930265c27e414b3934c6e0ef896adcc3045b966
|
data/Gemfile.lock
CHANGED
data/bin/aggwrap
CHANGED
@@ -5,6 +5,7 @@ require 'securerandom'
|
|
5
5
|
require 'aggkit'
|
6
6
|
require 'net/http'
|
7
7
|
require 'uri'
|
8
|
+
require 'socket'
|
8
9
|
|
9
10
|
module Diplomat
|
10
11
|
|
@@ -67,7 +68,7 @@ consul_addr = Aggkit::Consul.build_consul_addr(addr: ENV['CONSUL_HTTP_ADDR'], ho
|
|
67
68
|
|
68
69
|
@opts = {
|
69
70
|
service: ENV['AGGREDATOR_SERVICE'],
|
70
|
-
id:
|
71
|
+
id: Socket.gethostname,
|
71
72
|
reload_interval: DEFAULT_RELOAD_INTERVAL,
|
72
73
|
tags: []
|
73
74
|
}
|
@@ -171,7 +172,9 @@ SERVICE_ID = "#{@opts[:service]}_#{@opts[:id]}".freeze
|
|
171
172
|
@checks[:exec] = "#{SERVICE_ID}_exec_ttl"
|
172
173
|
@service[:Checks].push(
|
173
174
|
CheckID: @checks[:exec],
|
175
|
+
ServiceID: SERVICE_ID,
|
174
176
|
Name: "Wrapped service: #{@opts[:service]}. Process: #{@opts[:exec].inspect}",
|
177
|
+
Notes: "Wrapped service: #{@opts[:service]}. Process: #{@opts[:exec].inspect}",
|
175
178
|
DeregisterCriticalServiceAfter: '1m',
|
176
179
|
TTL: '50s'
|
177
180
|
)
|
@@ -180,7 +183,9 @@ if @opts[:http]
|
|
180
183
|
@checks[:http] = "#{SERVICE_ID}_http_ttl"
|
181
184
|
@service[:Checks].push(
|
182
185
|
CheckID: @checks[:http],
|
186
|
+
ServiceID: SERVICE_ID,
|
183
187
|
Name: "Wrapped service: #{@opts[:service]}. HTTP: #{@opts[:http]}",
|
188
|
+
Notes: "Wrapped service: #{@opts[:service]}. HTTP: #{@opts[:http]}",
|
184
189
|
DeregisterCriticalServiceAfter: '1m',
|
185
190
|
TTL: '50s'
|
186
191
|
)
|
@@ -190,7 +195,9 @@ if @opts[:file]
|
|
190
195
|
@checks[:file] = "#{SERVICE_ID}_file_ttl"
|
191
196
|
@service[:Checks].push(
|
192
197
|
CheckID: @checks[:file],
|
198
|
+
ServiceID: SERVICE_ID,
|
193
199
|
Name: "Wrapped service: #{@opts[:service]}. File: #{@opts[:file]}",
|
200
|
+
Notes: "Wrapped service: #{@opts[:service]}. File: #{@opts[:file]}",
|
194
201
|
DeregisterCriticalServiceAfter: '1m',
|
195
202
|
TTL: '50s'
|
196
203
|
)
|
@@ -200,7 +207,9 @@ if @opts[:pidfile]
|
|
200
207
|
@checks[:pidfile] = "#{SERVICE_ID}_pidfile_ttl"
|
201
208
|
@service[:Checks].push(
|
202
209
|
CheckID: @checks[:pidfile],
|
210
|
+
ServiceID: SERVICE_ID,
|
203
211
|
Name: "Wrapped service: #{@opts[:service]}. Pidfile: #{@opts[:pidfile]}",
|
212
|
+
Notes: "Wrapped service: #{@opts[:service]}. Pidfile: #{@opts[:pidfile]}",
|
204
213
|
DeregisterCriticalServiceAfter: '1m',
|
205
214
|
TTL: '50s'
|
206
215
|
)
|
@@ -210,14 +219,16 @@ if @opts[:script]
|
|
210
219
|
@checks[:script] = "#{SERVICE_ID}_script_ttl"
|
211
220
|
@service[:Checks].push(
|
212
221
|
CheckID: @checks[:script],
|
222
|
+
ServiceID: SERVICE_ID,
|
213
223
|
Name: "Wrapped service: #{@opts[:service]}. Script: #{@opts[:script]}",
|
224
|
+
Notes: "Wrapped service: #{@opts[:service]}. Script: #{@opts[:script]}",
|
214
225
|
DeregisterCriticalServiceAfter: '1m',
|
215
226
|
TTL: '50s'
|
216
227
|
)
|
217
228
|
end
|
218
229
|
|
219
230
|
def make_ttl_pass(check_id, output = nil)
|
220
|
-
output = "#{Time.now.utc}\n#{output}"
|
231
|
+
output = "Check at: #{Time.now.utc}\n#{output}"
|
221
232
|
STDERR.puts "TTL call failed: #{check_id}" unless Diplomat::Check.pass(check_id, output)
|
222
233
|
end
|
223
234
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aggkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.6.
|
4
|
+
version: 0.4.6.15735
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Godko Ivan
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-09-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: diplomat
|