mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-24 19:52:29 +02:00
add docker or baremetal existence
This commit is contained in:
parent
7033406ba6
commit
f92d339a5d
@ -5,6 +5,7 @@ from django.apps import apps
|
|||||||
from celery import shared_task
|
from celery import shared_task
|
||||||
from .models import AnalyticsTokens, AnalyticsIdentifier
|
from .models import AnalyticsTokens, AnalyticsIdentifier
|
||||||
from .utils import (
|
from .utils import (
|
||||||
|
existence_baremetal_or_docker,
|
||||||
install_stat_addons,
|
install_stat_addons,
|
||||||
install_stat_tokens,
|
install_stat_tokens,
|
||||||
install_stat_users)
|
install_stat_users)
|
||||||
@ -77,6 +78,7 @@ def analytics_daily_stats():
|
|||||||
users = install_stat_users()
|
users = install_stat_users()
|
||||||
tokens = install_stat_tokens()
|
tokens = install_stat_tokens()
|
||||||
addons = install_stat_addons()
|
addons = install_stat_addons()
|
||||||
|
existence_type = existence_baremetal_or_docker()
|
||||||
logger.debug("Running Daily Analytics Upload")
|
logger.debug("Running Daily Analytics Upload")
|
||||||
|
|
||||||
analytics_event(namespace='allianceauth.analytics',
|
analytics_event(namespace='allianceauth.analytics',
|
||||||
@ -84,6 +86,11 @@ def analytics_daily_stats():
|
|||||||
label='existence',
|
label='existence',
|
||||||
value=1,
|
value=1,
|
||||||
event_type='Stats')
|
event_type='Stats')
|
||||||
|
analytics_event(namespace='allianceauth.analytics',
|
||||||
|
task='send_install_stats',
|
||||||
|
label=existence_type,
|
||||||
|
value=1,
|
||||||
|
event_type='Stats')
|
||||||
analytics_event(namespace='allianceauth.analytics',
|
analytics_event(namespace='allianceauth.analytics',
|
||||||
task='send_install_stats',
|
task='send_install_stats',
|
||||||
label='users',
|
label='users',
|
||||||
|
@ -34,3 +34,16 @@ def install_stat_addons() -> int:
|
|||||||
The Number of Installed Apps"""
|
The Number of Installed Apps"""
|
||||||
addons = len(list(apps.get_app_configs()))
|
addons = len(list(apps.get_app_configs()))
|
||||||
return addons
|
return addons
|
||||||
|
|
||||||
|
|
||||||
|
def existence_baremetal_or_docker() -> str:
|
||||||
|
"""Checks the Installation Type of an install
|
||||||
|
|
||||||
|
Returns
|
||||||
|
-------
|
||||||
|
str
|
||||||
|
existence_baremetal or existence_docker"""
|
||||||
|
docker_tag = os.getenv('AA_DOCKER_TAG')
|
||||||
|
if docker_tag:
|
||||||
|
return "existence_docker"
|
||||||
|
return "existence_baremetal"
|
||||||
|
@ -27,6 +27,7 @@ Analytics comes preloaded with our Google Analytics token, and the three types o
|
|||||||
Our Daily Stats contain the following:
|
Our Daily Stats contain the following:
|
||||||
|
|
||||||
- A phone-in task to identify a server's existence
|
- A phone-in task to identify a server's existence
|
||||||
|
- A phone-in task to identify if a server is Bare-Metal or Dockerized
|
||||||
- A task to send the Number of User models
|
- A task to send the Number of User models
|
||||||
- A task to send the Number of Token Models
|
- A task to send the Number of Token Models
|
||||||
- A task to send the Number of Installed Apps
|
- A task to send the Number of Installed Apps
|
||||||
|
Loading…
x
Reference in New Issue
Block a user