mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-03-09 15:40:09 +00:00
fix renewals, add email for vm expiration
This commit is contained in:
parent
0df186f5c3
commit
bf19241bed
4 changed files with 61 additions and 2 deletions
|
@ -47,6 +47,16 @@ def get_expired_vms(db):
|
|||
return expired
|
||||
|
||||
|
||||
def get_expiring_vms(db):
|
||||
expiring = []
|
||||
today = datetime.date.today()
|
||||
expire = db.query(VM_Expiration).filter(
|
||||
(VM_Expiration.expire_date - today) <= 10).all()
|
||||
for vm in expire:
|
||||
expiring.append(vm.id)
|
||||
return expiring
|
||||
|
||||
|
||||
def get_user_usage_limits(db, user):
|
||||
limits = dict()
|
||||
if is_rtp(user):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue