mirror of
https://github.com/ansible/awx.git
synced 2026-07-06 22:08:08 -02:30
add insights setting, optimize and consolidate queries
This commit is contained in:
@@ -31,7 +31,7 @@ def _valid_license():
|
||||
logger.exception("A valid license was not found:")
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
|
||||
def register(key):
|
||||
"""
|
||||
@@ -73,6 +73,10 @@ def gather(dest=None, module=None):
|
||||
if last_run < max_interval or not last_run:
|
||||
last_run = max_interval
|
||||
|
||||
if settings.INSIGHTS_DATA_ENABLED:
|
||||
logger.exception("Insights not enabled. Analytics data not gathered.")
|
||||
return
|
||||
|
||||
if _valid_license() is False:
|
||||
logger.exception("Invalid License provided, or No License Provided")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user