disable verbosity on fargo-cleanup command (#23099)
This commit is contained in:
parent
90d3f824d9
commit
ef7a272c3f
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue