add scheduler script, store rtp view cache in db and schedule generation

This commit is contained in:
Jordan Rodgers 2018-01-26 02:03:45 -05:00
parent 59836baf74
commit 1fd989d6c2
6 changed files with 69 additions and 10 deletions

View file

@ -90,3 +90,11 @@ def process_expiring_vms_task():
expiring_vms.append([name, days])
if expiring_vms:
send_vm_expire_email('com6056', expiring_vms)
def generate_pool_cache_task():
with app.app_context():
proxmox = connect_proxmox()
db = connect_db()
pools = get_vms_for_rtp(proxmox, db)
store_pool_cache(db, pools)