multitenant: print ignored commands in standard verbosity mode (#57528)

This commit is contained in:
Emmanuel Cazenave 2021-10-05 12:01:47 +02:00 committed by Frédéric Péters
parent 1aecb81817
commit 8cba72a818
1 changed files with 2 additions and 2 deletions

View File

@ -121,7 +121,7 @@ class Command(InteractiveTenantOption, BaseCommand):
and not args_namespace.force_job
and getattr(settings, 'DISABLE_CRON_JOBS', False)
):
if args_verbosity.verbosity > 1:
if args_verbosity.verbosity > 0:
print('Command %s is ignored because DISABLE_CRON_JOBS is set' % command)
return
@ -130,7 +130,7 @@ class Command(InteractiveTenantOption, BaseCommand):
for tenant in TenantMiddleware.get_tenants():
connection.set_tenant(tenant)
if getattr(settings, 'TENANT_DISABLE_CRON_JOBS', False):
if args_verbosity.verbosity > 1 or args_namespace.force_job:
if args_verbosity.verbosity > 0 or args_namespace.force_job:
msg = 'Command %s is ignored on tenant %s because TENANT_DISABLE_CRON_JOBS is set' % (
command,
tenant.domain_url,