Revision 9c4e0410 cron_notify_expired.py
b/cron_notify_expired.py | ||
---|---|---|
10 | 10 |
def notify_expired(): |
11 | 11 |
routes = Route.objects.all() |
12 | 12 |
for route in routes: |
13 |
if route.status != 'EXPIRED':
|
|
13 |
if route.status not in ['EXPIRED', 'ADMININACTIVE', 'ERROR']:
|
|
14 | 14 |
expiration_days = (route.expires - datetime.date.today()).days |
15 | 15 |
if expiration_days < settings.EXPIRATION_NOTIFY_DAYS: |
16 | 16 |
try: |
Also available in: Unified diff