mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-27 10:50:10 +03:00
feature #2072: Use first level ETIME
This commit is contained in:
parent
a20e05c263
commit
336b926ad8
@ -250,8 +250,7 @@ module Instance
|
||||
def include_terminated_instance?(vm)
|
||||
if include_terminated_instances?
|
||||
if EC2_STATES[ONE_STATES[vm.status]||:pending][:name] == "terminated"
|
||||
end_time = vm.retrieve_elements("ETIME")[0].to_i
|
||||
if (Time.now.getutc.to_i - end_time) <= TERMINATED_INSTANCES_EXPIRATION_TIME
|
||||
if (Time.now.getutc.to_i - vm["ETIME"].to_i) <= TERMINATED_INSTANCES_EXPIRATION_TIME
|
||||
return true
|
||||
else
|
||||
return false
|
||||
|
Loading…
x
Reference in New Issue
Block a user