Shutdown Source VM (PAUSED) on successfull migration + blackened all .py files
This commit is contained in:
parent
29e938dc74
commit
9bdf4d2180
31 changed files with 1307 additions and 638 deletions
|
|
@ -29,7 +29,9 @@ class HostEntry(SpecificEtcdEntryBase):
|
|||
self.last_heartbeat = time.strftime("%Y-%m-%d %H:%M:%S")
|
||||
|
||||
def is_alive(self):
|
||||
last_heartbeat = datetime.strptime(self.last_heartbeat, "%Y-%m-%d %H:%M:%S")
|
||||
last_heartbeat = datetime.strptime(
|
||||
self.last_heartbeat, "%Y-%m-%d %H:%M:%S"
|
||||
)
|
||||
delta = datetime.now() - last_heartbeat
|
||||
if delta.total_seconds() > 60:
|
||||
return False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue