panteras_api 0.0.16 → 0.0.17
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.
- checksums.yaml +4 -4
- data/lib/panteras_api/chronos_endpoint.rb +1 -1
- data/lib/panteras_api/mesos_cluster.rb +6 -1
- data/lib/panteras_api/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: e4b955251eddc394db7699452f1cc4e118886992
|
4
|
+
data.tar.gz: b24fc0cf6a97bc65c5c2ff09762e67c11dc1af61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfce7735f8bb000e42710f6c516a925d28c7616b1584012e06942255e5afff93ec8f375cdb16b79b5522588f7dd5b6ef19cb7b8a81c6e68bffd7e07c0ae81d3e
|
7
|
+
data.tar.gz: 6fab7f571aed7b8b93009f11dacad2328410a440d7e95952dce1e4e3b66f31dec67d56416529de3f06df9c801d20aad4dcb0562b4815f9a66e64b1acc2a0558f
|
@@ -51,7 +51,7 @@ class MesosCluster
|
|
51
51
|
|
52
52
|
def tasks(framework = nil)
|
53
53
|
results = frameworks.collect do |a|
|
54
|
-
if a[:name]
|
54
|
+
if a[:name].include? framework
|
55
55
|
a[:tasks].collect { |t| t[:slave_hostname] = slave_hostname_by_id(t[:slave_id]) ; t }
|
56
56
|
end
|
57
57
|
end
|
@@ -64,6 +64,11 @@ class MesosCluster
|
|
64
64
|
|
65
65
|
def my_tasks_ids(hostname, framework)
|
66
66
|
raise ArgumentError, "missing hostname argument", caller if hostname.nil?
|
67
|
+
# use only the first string before "-" if the task list is empty for framework
|
68
|
+
# this is needed to make sure we use the right framework name for the mesos version
|
69
|
+
if tasks(framework).nil?
|
70
|
+
framework = framework.gsub(/-[^\s]+/,"")
|
71
|
+
end
|
67
72
|
new_tasks = tasks(framework)
|
68
73
|
if ! new_tasks.nil?
|
69
74
|
new_tasks.select { |t| t[:slave_hostname] =~ /^#{hostname}$/ }.collect { |t| t[:id] }
|
data/lib/panteras_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: panteras_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Colby
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|