marathon-srv 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/marathon/srv/client.rb +17 -15
- data/lib/marathon/srv/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 593a5842b3b6e8a4ad064d43e1ce33cd0e191942
|
4
|
+
data.tar.gz: 13962e41a441a18964aedff0a307fa01ef75a357
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2db9b8d080f9b3d1eee126a17b89049c15fbeda0238034d78c43758c8015ee1364f0ba0fc564b72c8e9f34d85fb3276bae13bc161f02088b20cae354f36d9c5
|
7
|
+
data.tar.gz: d13dc1b605c105c28dfb95a20b4913a2877ab5bef70758f9965d5dd3a775734f3c02b7131954509866cd3c8af07dd35876d98785b22ffab3cf2a0e78db61d008
|
data/lib/marathon/srv/client.rb
CHANGED
@@ -66,25 +66,27 @@ module Marathon
|
|
66
66
|
|
67
67
|
# collect slave ports of (healthy) tasks
|
68
68
|
ports=[]
|
69
|
-
app["tasks"]
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
69
|
+
if (app["tasks"] != nil)
|
70
|
+
app["tasks"].each do |task|
|
71
|
+
|
72
|
+
if(healthy_tasks_only)
|
73
|
+
@logger.debug "Verifying health checks for task #{task}"
|
74
|
+
# all health checks must be passing
|
75
|
+
passing=true
|
76
|
+
task["healthCheckResults"].each do |health_check_result|
|
77
|
+
(passing=false; @logger.debug "%s has failing health check, not considering it" % task; break) unless health_check_result["alive"] == true
|
78
|
+
|
79
|
+
end
|
80
|
+
(@logger.debug "All health checks passing - filtering ports for task #{task}"; ports.push filter_ports(app, task, filter_ports)) if passing
|
81
|
+
|
82
|
+
else
|
83
|
+
# just add task
|
84
|
+
@logger.debug "Ignoring health checks - filtering ports for task #{task}"
|
85
|
+
ports.push filter_ports(app, task, filter_ports)
|
77
86
|
|
78
87
|
end
|
79
|
-
(@logger.debug "All health checks passing - filtering ports for task #{task}"; ports.push filter_ports(app, task, filter_ports)) if passing
|
80
|
-
|
81
|
-
else
|
82
|
-
# just add task
|
83
|
-
@logger.debug "Ignoring health checks - filtering ports for task #{task}"
|
84
|
-
ports.push filter_ports(app, task, filter_ports)
|
85
88
|
|
86
89
|
end
|
87
|
-
|
88
90
|
end
|
89
91
|
|
90
92
|
# cleanup
|
data/lib/marathon/srv/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marathon-srv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andras Szerdahelyi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|