Fix the gather_analytics management command

Previously, invoking the command with neither of the --ship or
--dry-run flags would result in effectively doing a dry run.  With the
stricter checks now in place in analytics.core.gather, let's make sure
that we pass the 'dry-run' parameter in to gather() in the no-flags
case.
This commit is contained in:
Jeff Bradberry
2021-03-17 14:01:32 -04:00
parent 772da61980
commit 0b31e771b1
2 changed files with 3 additions and 2 deletions

View File

@@ -135,7 +135,7 @@ def gather(dest=None, module=None, subset=None, since=None, until=None, collecti
return None
if not (settings.AUTOMATION_ANALYTICS_URL and settings.REDHAT_USERNAME and settings.REDHAT_PASSWORD):
logger.log(log_level, "Not gathering analytics, configuration is invalid")
logger.log(log_level, "Not gathering analytics, configuration is invalid. Use --dry-run to gather locally without sending.")
return None
with advisory_lock('gather_analytics_lock', wait=False) as acquired: