disable verbosity on fargo-cleanup command (#23099)

This commit is contained in:
Thomas NOËL 2018-04-11 17:21:41 +02:00 committed by Frédéric Péters
parent 90d3f824d9
commit ef7a272c3f
1 changed files with 7 additions and 2 deletions

View File

@ -7,7 +7,12 @@ from fargo.fargo.utils import cleanup
class Command(BaseCommand):
help = 'Clean expired models'
def add_arguments(self, parser):
# set verbosity=0 by default, because solr-thumbnail is too talkative
# with verbosity=1, and cleanup-fargo is targeted for cron.
parser.set_defaults(verbosity=0)
def handle(self, *args, **options):
cleanup()
call_command('thumbnail', 'cleanup')
verbosity = int(options.get('verbosity'))
call_command('thumbnail', 'cleanup', verbosity=verbosity)