|
|
@ -101,6 +101,7 @@ for host in all_hosts: |
|
|
|
# deactivate if expired |
|
|
|
# deactivate if expired |
|
|
|
min_dl = datetime.timedelta(days=config['activate_min_delay']) |
|
|
|
min_dl = datetime.timedelta(days=config['activate_min_delay']) |
|
|
|
if host.expires < datetime.datetime.utcnow().date(): |
|
|
|
if host.expires < datetime.datetime.utcnow().date(): |
|
|
|
|
|
|
|
if host.activated == True: |
|
|
|
log.info('deactivating %s, reason: expired', host.name) |
|
|
|
log.info('deactivating %s, reason: expired', host.name) |
|
|
|
host.activated = False |
|
|
|
host.activated = False |
|
|
|
# if not expired and added more than X days ago and approved then activate |
|
|
|
# if not expired and added more than X days ago and approved then activate |
|
|
|