lib/miasma/contrib/aws/orchestration.rb in miasma-aws-0.3.0 vs lib/miasma/contrib/aws/orchestration.rb in miasma-aws-0.3.2
- old
+ new
@@ -382,12 +382,12 @@
:resource_status_reason => event['ResourceStatusReason'],
:time => Time.parse(event['Timestamp'])
).valid_state
end
if(evt_id)
- idx = events.index{|d| e.id == evt_id}
- idx = idx ? idx + 1 : 0
- events.slice(idx, events.size)
+ idx = events.index{|d| d.id == evt_id}
+ idx ? idx + 1 : 0
+ events.slice(0, idx)
else
events
end
end