aggkit 0.2.9.8711 → 0.2.9.8725

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/bin/aggstart +15 -8
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 98d5c6bfe3432fcfaf653ced9b1f1f459a6e7075
4
- data.tar.gz: 0a91f240d71e53a85c6d74a5481e2dbe3ed8f00b
3
+ metadata.gz: d0aca73460b75c612192138b7fc158d09f100285
4
+ data.tar.gz: 71d6c9237c9b0a37f34475c14bcfa3668df72be9
5
5
  SHA512:
6
- metadata.gz: fef770673c074aa3376c8d416b7dc3b3d3f2760da8a35539afe6457ebfe06279e63babff42f77442ba744a02ab99625902f5981752be4d218e27ddd3dab1e6fd
7
- data.tar.gz: 5bac7bb03a03bd318428aec3c80c41ea908ba3cdb250be230408b476545cac73fc439d03124979ec44e0e10fe23da7d940957e9feea3e3e9a3a82fa5a2e40af7
6
+ metadata.gz: 29fb6e8d0aa9a82707150ace023c69d915b9b1e6d7f23b5b7ee72fdd1bd086b8817bd5de13ce94f48d9f0e243437bdc5347149c72acd2c22ff289ee72747fc37
7
+ data.tar.gz: 524cf71c2d723310082bc9792d4a1f5d9a01fc3e0f7fd9b26cb56daa7abe14237d3299872c8cf91861002041c61967986966840cae4675851967ae3de3b5e73e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- aggkit (0.2.9.8711)
4
+ aggkit (0.2.9.8725)
5
5
  diplomat
6
6
  dotenv
7
7
  json
@@ -52,4 +52,4 @@ DEPENDENCIES
52
52
  rspec-set
53
53
 
54
54
  BUNDLED WITH
55
- 1.16.6
55
+ 1.16.2
data/bin/aggstart CHANGED
@@ -21,7 +21,11 @@ parser = OptionParser.new do |o|
21
21
  end
22
22
 
23
23
  o.on("--consul=#{@opts[:consul]}", 'set consul host') do |consul|
24
- @opts[:consul] = consul.to_s
24
+ if consul.to_s == 'none'
25
+ @opts[:consul] = nil
26
+ else
27
+ @opts[:consul] = consul.to_s
28
+ end
25
29
  end
26
30
 
27
31
  o.on("--consulconf=list", 'set list of folders with consul configs') do |list|
@@ -51,19 +55,22 @@ $NODE_NAME = ENV['NODE_NAME'] ||= "#{$AGGREDATOR_SERVICE}_#{`hostname`.strip}".s
51
55
  envsubst '/home/app/consul'
52
56
 
53
57
  Aggkit::Watcher.new.exec do |watcher|
54
- #watcher.add %W{consul agent -config-dir consul -config-dir consul/smev3 -node #{$NODE_NAME}}
55
- configs = @opts[:consulconf].map do |folder|
56
- "-config-dir #{folder}"
57
- end.join(' ').strip
58
58
 
59
- watcher.add "consul agent #{configs} -node #{$NODE_NAME}".split
59
+ if @opts[:consul]
60
+ #watcher.add %W{consul agent -config-dir consul -config-dir consul/smev3 -node #{$NODE_NAME}}
61
+ configs = @opts[:consulconf].map do |folder|
62
+ "-config-dir #{folder}"
63
+ end.join(' ').strip
60
64
 
61
- execute!("waiter.rb -t 20 --consul-addr=http://#{$CONSUL_HOST}:8500 --consul", "Timeout for consul service")
65
+ watcher.add "consul agent #{configs} -node #{$NODE_NAME}".split
66
+ end
67
+
68
+ execute!("aggwait -t 20 --consul-addr=http://#{$CONSUL_HOST}:8500 --consul", "Timeout for consul service")
62
69
 
63
70
  load_envs_from_consul($CONSUL_HOST, $AGGREDATOR_SERVICE)
64
71
 
65
72
  @opts[:depends].each do |service|
66
- execute!("waiter.rb -t 60 --consul-addr=http://$CONSUL_HOST:8500 --consul-service #{service}", "Timeout for #{service} service")
73
+ execute!("aggwait -t 60 --consul-addr=http://$CONSUL_HOST:8500 --consul-service #{service}", "Timeout for #{service} service")
67
74
  end
68
75
 
69
76
  sleep 2
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.2.9.8711
4
+ version: 0.2.9.8725
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-02-18 00:00:00.000000000 Z
12
+ date: 2019-02-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: diplomat