lex-health 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +0 -3
- data/Dockerfile +4 -6
- data/Gemfile.lock +8 -19
- data/bitbucket-pipelines.yml +2 -0
- data/lex-health.gemspec +0 -3
- data/lib/legion/extensions/health/runners/health.rb +4 -4
- data/lib/legion/extensions/health/runners/watchdog.rb +3 -3
- data/lib/legion/extensions/health/transport/queues/health.rb +2 -2
- data/lib/legion/extensions/health/version.rb +1 -1
- metadata +2 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85c20c15c909246e2db7095731a7e612ae85774ee213f20551b14e25ddaa10e9
|
4
|
+
data.tar.gz: 803eb25ae8ef49107402cbc64a942888a2fca16f97238910773c32c1f2befdfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e203fbab722e67a7d003a691184ba1fa4e61a03a77ae3b6ec99f8ac247b3704aaf21c0430f749e68e20400bdc7f4bb30dc6e19100ac5c4044c86f0bf88080348
|
7
|
+
data.tar.gz: 255941157ba3c6fae1b807876b7d34ff04894cd2f4ec6b097a71b263fe213a6fdd1b3e0744b7de61c870278902ef6ab2179817598dfaa95ebc542d8e75f596ea
|
data/.rubocop.yml
CHANGED
data/Dockerfile
CHANGED
@@ -1,10 +1,8 @@
|
|
1
|
-
FROM
|
1
|
+
FROM legionio/legion:latest
|
2
2
|
LABEL maintainer="Matthew Iverson <matthewdiverson@gmail.com>"
|
3
3
|
|
4
|
-
RUN
|
5
|
-
RUN apk update && apk add build-base postgresql-dev mysql-client mariadb-dev tzdata gcc git
|
4
|
+
RUN apk update && apk add build-base tzdata postgresql-dev mysql-client mariadb-dev tzdata gcc git
|
6
5
|
|
7
6
|
COPY . ./
|
8
|
-
RUN gem install
|
9
|
-
|
10
|
-
CMD legionio
|
7
|
+
RUN gem install lex-health legion-data --no-document --no-prerelease
|
8
|
+
CMD ruby $(which legionio)
|
data/Gemfile.lock
CHANGED
@@ -6,17 +6,14 @@ PATH
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
ast (2.4.
|
10
|
-
codecov (0.2.15)
|
11
|
-
simplecov (>= 0.15, < 0.21)
|
9
|
+
ast (2.4.2)
|
12
10
|
diff-lcs (1.4.4)
|
13
|
-
docile (1.3.5)
|
14
11
|
parallel (1.20.1)
|
15
12
|
parser (3.0.0.0)
|
16
13
|
ast (~> 2.4.1)
|
17
14
|
rainbow (3.0.0)
|
18
15
|
rake (13.0.3)
|
19
|
-
regexp_parser (2.
|
16
|
+
regexp_parser (2.1.1)
|
20
17
|
rexml (3.2.4)
|
21
18
|
rspec (3.10.0)
|
22
19
|
rspec-core (~> 3.10.0)
|
@@ -27,11 +24,11 @@ GEM
|
|
27
24
|
rspec-expectations (3.10.1)
|
28
25
|
diff-lcs (>= 1.2.0, < 2.0)
|
29
26
|
rspec-support (~> 3.10.0)
|
30
|
-
rspec-mocks (3.10.
|
27
|
+
rspec-mocks (3.10.2)
|
31
28
|
diff-lcs (>= 1.2.0, < 2.0)
|
32
29
|
rspec-support (~> 3.10.0)
|
33
|
-
rspec-support (3.10.
|
34
|
-
rubocop (1.
|
30
|
+
rspec-support (3.10.2)
|
31
|
+
rubocop (1.11.0)
|
35
32
|
parallel (~> 1.10)
|
36
33
|
parser (>= 3.0.0.0)
|
37
34
|
rainbow (>= 2.2.2, < 4.0)
|
@@ -40,26 +37,18 @@ GEM
|
|
40
37
|
rubocop-ast (>= 1.2.0, < 2.0)
|
41
38
|
ruby-progressbar (~> 1.7)
|
42
39
|
unicode-display_width (>= 1.4.0, < 3.0)
|
43
|
-
rubocop-ast (1.4.
|
40
|
+
rubocop-ast (1.4.1)
|
44
41
|
parser (>= 2.7.1.5)
|
45
|
-
rubocop-rspec (2.
|
42
|
+
rubocop-rspec (2.2.0)
|
46
43
|
rubocop (~> 1.0)
|
47
44
|
rubocop-ast (>= 1.1.0)
|
48
45
|
ruby-progressbar (1.11.0)
|
49
|
-
simplecov (0.20.0)
|
50
|
-
docile (~> 1.1)
|
51
|
-
simplecov-html (~> 0.11)
|
52
|
-
simplecov_json_formatter (~> 0.1)
|
53
|
-
simplecov-html (0.12.3)
|
54
|
-
simplecov_json_formatter (0.1.2)
|
55
46
|
unicode-display_width (2.0.0)
|
56
47
|
|
57
48
|
PLATFORMS
|
58
49
|
ruby
|
59
50
|
|
60
51
|
DEPENDENCIES
|
61
|
-
bundler
|
62
|
-
codecov
|
63
52
|
lex-health!
|
64
53
|
rake
|
65
54
|
rspec
|
@@ -67,4 +56,4 @@ DEPENDENCIES
|
|
67
56
|
rubocop-rspec
|
68
57
|
|
69
58
|
BUNDLED WITH
|
70
|
-
2.
|
59
|
+
2.2.6
|
data/bitbucket-pipelines.yml
CHANGED
data/lex-health.gemspec
CHANGED
@@ -24,11 +24,8 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
25
25
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
26
|
end
|
27
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
27
|
spec.require_paths = ['lib']
|
29
28
|
|
30
|
-
spec.add_development_dependency 'bundler'
|
31
|
-
spec.add_development_dependency 'codecov'
|
32
29
|
spec.add_development_dependency 'rake'
|
33
30
|
spec.add_development_dependency 'rspec'
|
34
31
|
spec.add_development_dependency 'rubocop'
|
@@ -9,15 +9,15 @@ module Legion::Extensions::Health
|
|
9
9
|
return { success: insert(hostname: hostname, **opts), hostname: hostname, **opts } if item.nil?
|
10
10
|
|
11
11
|
if opts.key?(:timestamp) && !item.values[:updated].nil? && item.values[:updated] > Time.parse(opts[:timestamp])
|
12
|
-
return { success:
|
13
|
-
reason:
|
14
|
-
hostname:
|
12
|
+
return { success: false,
|
13
|
+
reason: 'entry already updated',
|
14
|
+
hostname: hostname,
|
15
15
|
db_updated: item.values[:updated],
|
16
16
|
**opts }
|
17
17
|
end
|
18
18
|
|
19
19
|
{
|
20
|
-
success:
|
20
|
+
success: item.update(active: 1, status: opts[:status], name: hostname, updated: Sequel::CURRENT_TIMESTAMP),
|
21
21
|
hostname: hostname,
|
22
22
|
**opts
|
23
23
|
}
|
@@ -18,9 +18,9 @@ module Legion::Extensions::Health
|
|
18
18
|
)
|
19
19
|
.where(active: true)
|
20
20
|
.each do |node|
|
21
|
-
Legion::Transport::Messages::NodeHealth.new(status:
|
22
|
-
node_id:
|
23
|
-
hostname:
|
21
|
+
Legion::Transport::Messages::NodeHealth.new(status: 'unknown',
|
22
|
+
node_id: node.values[:id],
|
23
|
+
hostname: node.values[:name],
|
24
24
|
timestamp: node.values[:updated]).publish
|
25
25
|
nodes.push(node.values[:id])
|
26
26
|
end
|
metadata
CHANGED
@@ -1,43 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lex-health
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miverson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: bundler
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: codecov
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
13
|
- !ruby/object:Gem::Dependency
|
42
14
|
name: rake
|
43
15
|
requirement: !ruby/object:Gem::Requirement
|