forked from 3wordchant/capsul-flask
forest uncommitted changes on multi-host branch
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user