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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fa9a28d5862099feadc9a80ef60a903809befd1b
4
- data.tar.gz: bbbe7c05380fb15a51ee1944fab7f1c6de10a4a6
3
+ metadata.gz: 593a5842b3b6e8a4ad064d43e1ce33cd0e191942
4
+ data.tar.gz: 13962e41a441a18964aedff0a307fa01ef75a357
5
5
  SHA512:
6
- metadata.gz: 5d783c03cbfaa26adc93cad895769f9c9cdf10569a6d64ef6defb595b8da04adc5a231c09eaeb08980f0b2e7eee190580ff80a32ecc9a7a3eee7bd8ab57a9ef5
7
- data.tar.gz: 2a8033b5cfd84d190d75d40c78f2b5d5a697ff583fb65dd7368ba4dd049d5e4ba5d2926963b1142aa4f0f179fb8b8e1fef32b6853bccaefc5e0a6d282b7b3c37
6
+ metadata.gz: a2db9b8d080f9b3d1eee126a17b89049c15fbeda0238034d78c43758c8015ee1364f0ba0fc564b72c8e9f34d85fb3276bae13bc161f02088b20cae354f36d9c5
7
+ data.tar.gz: d13dc1b605c105c28dfb95a20b4913a2877ab5bef70758f9965d5dd3a775734f3c02b7131954509866cd3c8af07dd35876d98785b22ffab3cf2a0e78db61d008
@@ -66,25 +66,27 @@ module Marathon
66
66
 
67
67
  # collect slave ports of (healthy) tasks
68
68
  ports=[]
69
- app["tasks"].each do |task|
70
-
71
- if(healthy_tasks_only)
72
- @logger.debug "Verifying health checks for task #{task}"
73
- # all health checks must be passing
74
- passing=true
75
- task["healthCheckResults"].each do |health_check_result|
76
- (passing=false; @logger.debug "%s has failing health check, not considering it" % task; break) unless health_check_result["alive"] == true
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
@@ -1,5 +1,5 @@
1
1
  module Marathon
2
2
  module Srv
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  end
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.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 00:00:00.000000000 Z
11
+ date: 2016-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor