fix issue #10
This commit is contained in:
parent
341f1cb2d5
commit
2bdddbced8
|
@ -19,7 +19,7 @@ import datetime
|
|||
import logging
|
||||
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.utils import timezone as tz
|
||||
|
||||
|
@ -76,7 +76,7 @@ class Actions:
|
|||
items.append(diffusion.id)
|
||||
|
||||
logger.info('[check] %d diffusions will be removed', len(items))
|
||||
if len(items):
|
||||
if items:
|
||||
Diffusion.objects.filter(id__in=items).delete()
|
||||
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
# aircox daily tasks:
|
||||
# - diffusions monitoring for the current month
|
||||
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
|
||||
scripts/launch_in_venv ./manage.py diffusions --update --next-month --mode auto
|
||||
scripts/launch_in_venv ./manage.py diffusions --update --next-month
|
||||
cd -
|
||||
|
||||
# - archiver monitoring for the next month
|
||||
|
|
Loading…
Reference in New Issue
Block a user