tear down SSH tunnel every time console button is clicked and on suspend, yapf a few things

This commit is contained in:
Jordan Rodgers 2018-04-26 02:59:09 -04:00
parent 9f7f5d27ca
commit dd876a8b2c
3 changed files with 19 additions and 28 deletions

View file

@ -95,7 +95,9 @@ def process_expiring_vms_task():
if days <= 0:
vm.stop()
elif days == -7:
print("Deleting {} ({}) as it has been a week since expiration.".format(vm.name, vm.id))
print(
"Deleting {} ({}) as it has been a week since expiration.".
format(vm.name, vm.id))
send_stop_ssh_tunnel(vm.id)
delete_vm_task(vm.id)
if expiring_vms: