autostacker24 1.0.43 → 1.0.44
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/autostacker24/stacker.rb +5 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c1865d9c3f5366ce1b5456d4a67600938b37abe
|
4
|
+
data.tar.gz: 5c593a9d5cdea96f3c6f24059e0e83417d127cdc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f87d6439043c5ebf6f56f4ef0d1482f7dbc74e6c5366eabb1889e08fc098576a54e0b484340d97c6e71779b333c20008fb29057c60fbfdb45d33c465b130091b
|
7
|
+
data.tar.gz: 39244b4ec4538ace78c0a9b9e84a187e5fe895906bd2613ce3fe74213cb239d07733593259c5da3bfe946f0846dfd3f883f33ca642c7bb677a0950f767668272
|
@@ -83,12 +83,14 @@ module Stacker
|
|
83
83
|
end
|
84
84
|
|
85
85
|
def wait_for_stack(stack_name, operation, timeout_in_minutes = 15)
|
86
|
-
start_time = Time.now
|
87
86
|
stop_time = Time.now + timeout_in_minutes * 60
|
88
87
|
finished = /(CREATE_COMPLETE|UPDATE_COMPLETE|DELETE_COMPLETE|ROLLBACK_COMPLETE|ROLLBACK_FAILED|CREATE_FAILED|DELETE_FAILED)$/
|
89
|
-
seen_events =
|
88
|
+
seen_events = Set.new
|
90
89
|
|
91
90
|
puts "waiting for #{operation} stack #{stack_name}"
|
91
|
+
|
92
|
+
get_stack_events(stack_name).each {|e| seen_events << e[:event_id] }
|
93
|
+
|
92
94
|
while Time.now < stop_time
|
93
95
|
stack = find_stack(stack_name)
|
94
96
|
status = stack ? stack.stack_status : 'DELETE_COMPLETE'
|
@@ -99,7 +101,7 @@ module Stacker
|
|
99
101
|
end
|
100
102
|
return true if status =~ expected_status
|
101
103
|
raise "#{operation} #{stack_name} failed, current status #{status}" if status =~ finished
|
102
|
-
get_stack_events(stack_name).select{
|
104
|
+
get_stack_events(stack_name).select{!seen_events.include?(e[:event_id]) }
|
103
105
|
.sort_by{|e| e[:timestamp]}
|
104
106
|
.each{
|
105
107
|
|e| seen_events << e[:event_id]
|