fix issue #10
This commit is contained in:
		@ -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()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -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
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user