forest uncommitted changes on multi-host branch

This commit is contained in:
2020-12-29 17:34:43 -06:00
parent 44738c78a9
commit d8d6124005
8 changed files with 385 additions and 123 deletions

View File

@ -249,13 +249,13 @@ def notify_users_about_account_balance():
if index_to_send == len(warnings)-1:
for vm in vms:
current_app.logger.warning(f"cron_task: deleting {vm['id']} ( {account['email']} ) due to negative account balance.")
current_app.config["VIRTUALIZATION_MODEL"].destroy(email=account["email"], id=vm['id'])
current_app.config["OPERATION_MODEL"].destroy(email=account["email"], id=vm['id'])
get_model().delete_vm(email=account["email"], id=vm['id'])
def ensure_vms_and_db_are_synced():
db_ids = get_model().all_non_deleted_vm_ids()
virt_ids = current_app.config["VIRTUALIZATION_MODEL"].list_ids()
virt_ids = current_app.config["OPERATION_MODEL"].list_ids()
db_ids_dict = dict()
virt_ids_dict = dict()