aggkit 0.4.4.10027 → 0.4.4.10117

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/aggwrap +25 -26
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3142b05196d6509337833a1b92fe5d93b5d9833c
4
- data.tar.gz: b464a587356df8f5b802b3cc28e461f96eae8d5b
3
+ metadata.gz: e0465d7453cb50d96d235cb8e31ccc5fcceed33c
4
+ data.tar.gz: c9a5b336cb5ee1e65411a2da27377359abedb329
5
5
  SHA512:
6
- metadata.gz: 9f9d3c5b79b8ad6382f3a262c6ef303fc378c27a25525941e75a585b4294b6a4c5992ca5169583eedf6f662c6ca106197522be79844f72b05a700d5a0bc04369
7
- data.tar.gz: c7031ff791294536fbf5a615a1f3c91d6fe053b16b5dd7ea3f46bb26da1496ad35189f44fa2fcd4f5e6e07c5e1e4987c87a2d059871c09f5da3d51680cb93251
6
+ metadata.gz: cc57ada3b351836a11a8dfa6fd1b27945a9256eaee95395ad64a6c4d09da51eece72b290a0d81aa739b7be77d0e3e69bac45aa80bf1ac27b9727e95346a30f62
7
+ data.tar.gz: 579863689c596abd94aa1fe57d26e63225ecba07807f6867adf21732c53f7215cfbb96966b950a3ae9550335ed37ff19d4cc9683cc362fa15cfe8463101fe124
data/bin/aggwrap CHANGED
@@ -235,42 +235,41 @@ rescue StandardError => e
235
235
  STDERR.puts "make_ttl_pass[#{check_id}] Exception: #{e.inspect}"
236
236
  end
237
237
 
238
- if Diplomat::Service.register(@service)
239
- Thread.new do
240
- loop do
241
- run_check(@checks[:exec]) do |check_id|
242
- make_ttl_pass(check_id)
243
- end
238
+ Thread.abort_on_exception = true
244
239
 
245
- if @checks[:http]
246
- run_check(@checks[:http]) do |check_id|
247
- check_http(check_id, @opts[:http])
248
- end
249
- end
240
+ Thread.new do
241
+ loop do
242
+ die("Can't register service #{@service} in consul") unless Diplomat::Service.register(@service)
243
+ run_check(@checks[:exec]) do |check_id|
244
+ make_ttl_pass(check_id)
245
+ end
250
246
 
251
- if @checks[:file]
252
- run_check(@checks[:file]) do |check_id|
253
- check_file(check_id, @opts[:file])
254
- end
247
+ if @checks[:http]
248
+ run_check(@checks[:http]) do |check_id|
249
+ check_http(check_id, @opts[:http])
255
250
  end
251
+ end
256
252
 
257
- if @checks[:pidfile]
258
- run_check(@checks[:pidfile]) do |check_id|
259
- check_pidfile(check_id, @opts[:pidfile])
260
- end
253
+ if @checks[:file]
254
+ run_check(@checks[:file]) do |check_id|
255
+ check_file(check_id, @opts[:file])
261
256
  end
257
+ end
262
258
 
263
- if @checks[:script]
264
- run_check(@checks[:script]) do |check_id|
265
- check_script(check_id, @opts[:script])
266
- end
259
+ if @checks[:pidfile]
260
+ run_check(@checks[:pidfile]) do |check_id|
261
+ check_pidfile(check_id, @opts[:pidfile])
267
262
  end
263
+ end
268
264
 
269
- sleep 10
265
+ if @checks[:script]
266
+ run_check(@checks[:script]) do |check_id|
267
+ check_script(check_id, @opts[:script])
268
+ end
270
269
  end
270
+
271
+ sleep 10
271
272
  end
272
- else
273
- die "can't register consul service"
274
273
  end
275
274
 
276
275
  $pid = fork do
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.4.10027
4
+ version: 0.4.4.10117
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-04-02 00:00:00.000000000 Z
12
+ date: 2019-04-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: diplomat