herdst_worker 0.2.5 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/herdst_worker/configuration/metadata.rb +20 -2
- data/lib/herdst_worker/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82fb9bad92d2b9865305b6137a5404c8c97754ddc508e61bbd47a43ea19344ea
|
4
|
+
data.tar.gz: cc61282b4fcc954906f8eccec9e06ff48d77cbfb04a093a3bda616aeb09ef0b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1abef9f675c2c85165fc1aeb7f30be9796cd710eb3602a1d08cd10e09753b7e4cce852260c3733c7747f91ccfa7862c747100a6e2c8d5291a2a8bdab9cc86125
|
7
|
+
data.tar.gz: b37f049af981ad89578e2d0af37094ad6c9bd0b77e578461f5bb8532c72091cdab49df25ddf244e4c12cc80eb8157127d48c128b5cb49a42a5929d8e11e6bc7e
|
@@ -63,7 +63,7 @@ module HerdstWorker
|
|
63
63
|
|
64
64
|
|
65
65
|
def get_tasks_info
|
66
|
-
metadata = make_request!(
|
66
|
+
metadata = make_request!(get_task_metadata_uri)
|
67
67
|
|
68
68
|
ecs_client = Aws::ECS::Client.new(
|
69
69
|
:region => self.secrets["AWS_REGION"],
|
@@ -78,6 +78,24 @@ module HerdstWorker
|
|
78
78
|
:include => ["TAGS"]
|
79
79
|
)
|
80
80
|
end
|
81
|
+
|
82
|
+
|
83
|
+
def get_services_info
|
84
|
+
info = self.get_tasks_info
|
85
|
+
|
86
|
+
ecs_client = Aws::ECS::Client.new(
|
87
|
+
:region => self.secrets["AWS_REGION"],
|
88
|
+
:credentials => self.aws_credentials
|
89
|
+
)
|
90
|
+
|
91
|
+
ecs_client.describe_services({
|
92
|
+
:cluster => info["tasks"][0]["cluster_arn"],
|
93
|
+
:services => [
|
94
|
+
info["tasks"][0]["group"].to_s.sub("services:", "")
|
95
|
+
],
|
96
|
+
:include => ["TAGS"]
|
97
|
+
})
|
98
|
+
end
|
81
99
|
|
82
100
|
|
83
101
|
def get_aws_credentials!
|
@@ -164,7 +182,7 @@ module HerdstWorker
|
|
164
182
|
|
165
183
|
|
166
184
|
private
|
167
|
-
def
|
185
|
+
def get_task_metadata_uri
|
168
186
|
ENV["ECS_CONTAINER_METADATA_URI"].to_s + "/task"
|
169
187
|
end
|
170
188
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: herdst_worker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Herd.St
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|