This commit is contained in:
bkfox 2020-05-20 12:42:43 +02:00
parent 341f1cb2d5
commit 2bdddbced8
2 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@ import datetime
import logging import logging
from argparse import RawTextHelpFormatter from argparse import RawTextHelpFormatter
from django.core.management.base import BaseCommand, CommandError from django.core.management.base import BaseCommand
from django.db import transaction from django.db import transaction
from django.utils import timezone as tz from django.utils import timezone as tz
@ -76,7 +76,7 @@ class Actions:
items.append(diffusion.id) items.append(diffusion.id)
logger.info('[check] %d diffusions will be removed', len(items)) logger.info('[check] %d diffusions will be removed', len(items))
if len(items): if items:
Diffusion.objects.filter(id__in=items).delete() Diffusion.objects.filter(id__in=items).delete()

View File

@ -3,9 +3,9 @@
# aircox daily tasks: # aircox daily tasks:
# - diffusions monitoring for the current month # - diffusions monitoring for the current month
cd /srv/apps/aircox/ cd /srv/apps/aircox/
scripts/launch_in_venv ./manage.py diffusions --update --clean --check --mode auto scripts/launch_in_venv ./manage.py diffusions --update --clean --check
# - diffusions monitoring for the next month # - diffusions monitoring for the next month
scripts/launch_in_venv ./manage.py diffusions --update --next-month --mode auto scripts/launch_in_venv ./manage.py diffusions --update --next-month
cd - cd -
# - archiver monitoring for the next month # - archiver monitoring for the next month