ecs-easy-cluster 0.0.4 → 0.0.5
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/ecs/easy/cluster/mem_scale.rb +8 -7
- data/lib/ecs/easy/cluster/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: 79863dc07a8eab32cf0fceccdf7551ce5e2dccd2
|
|
4
|
+
data.tar.gz: 466d0dd80e222094cc0041f414e81bb113fb50c3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b63e90c6af6f3dff5b65f622f6e7f3af1c922292c1dc8a18aa9e57810a4a413707f0e564dea18bd101b7e6238f99b5e78b5fb6ea799db24b0fd3d03023fcacf9
|
|
7
|
+
data.tar.gz: 42c45c024ccc3feb0b64893159d2ced1e005b11ee44aca55fccad644b3a4d446f1a1fbf561dcbda60f8a637562928f4a12d30b5975b2197d94a5c52178f49b6e
|
|
@@ -32,7 +32,7 @@ module Ecs::Easy::Cluster
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
retry_count =
|
|
35
|
+
retry_count = 0
|
|
36
36
|
begin
|
|
37
37
|
wait_until_ready
|
|
38
38
|
res = run_task!( task_definition, overrides )
|
|
@@ -45,22 +45,23 @@ module Ecs::Easy::Cluster
|
|
|
45
45
|
when "RESOURCE:MEMORY"
|
|
46
46
|
puts "No enough memory on current container instances to execute this task. Add another container instance automatically."
|
|
47
47
|
|
|
48
|
-
if num_instances >= max_instances
|
|
49
|
-
puts "Couldn\'t scale more instances because it reaches maximum instances. You should upgrade the maximum number of instance to execute multiple tasks at the same time."
|
|
50
|
-
end
|
|
51
48
|
unless acceptable_task?( task_definition )
|
|
52
49
|
raise "Couldn\'t accept this task because of the lack of memory. You should upgrade ec2 instance type."
|
|
53
50
|
end
|
|
54
51
|
|
|
55
|
-
|
|
52
|
+
if num_instances >= max_instances
|
|
53
|
+
puts "Couldn\'t scale more instances because it reaches maximum instances. You should upgrade the maximum number of instance to execute multiple tasks at the same time."
|
|
54
|
+
else
|
|
55
|
+
scale!
|
|
56
|
+
end
|
|
56
57
|
else
|
|
57
58
|
raise "Unknown reason: #{e.failures}"
|
|
58
59
|
end
|
|
59
60
|
|
|
60
61
|
puts "Failed to run the task. Try again."
|
|
61
62
|
sleep 10
|
|
62
|
-
retry_count
|
|
63
|
-
retry if retry_count
|
|
63
|
+
retry_count += 1
|
|
64
|
+
retry if retry_count <= 3
|
|
64
65
|
rescue => e
|
|
65
66
|
raise "Unknown reason: #{e}"
|
|
66
67
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ecs-easy-cluster
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- metheglin
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-01-
|
|
11
|
+
date: 2017-01-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aws-sdk
|