add insights setting, optimize and consolidate queries

This commit is contained in:
Christian Adams
2019-03-06 10:54:02 -05:00
parent ae9377e0e4
commit 636153d92c
9 changed files with 50 additions and 104 deletions

View File

@@ -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