mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
This is a first pass at building a framework for collecting various stats about realms, users, streams, etc. Includes: * New analytics tables for storing counts data * Raw SQL queries for pulling data from zerver/models.py tables * Aggregation functions for aggregating hourly stats into daily stats, and aggregating user/stream level stats into realm level stats * A management command for pulling the data Note that counts.py was added to the linter exclude list due to errors around %%s.
13 lines
474 B
Python
13 lines
474 B
Python
from __future__ import print_function
|
|
try:
|
|
from django.conf import settings
|
|
from zerver.models import *
|
|
from zerver.lib.actions import * # type: ignore # Otherwise have duplicate imports with previous line
|
|
from analytics.models import *
|
|
except Exception:
|
|
import traceback
|
|
print("\nException importing Zulip core modules on startup!")
|
|
traceback.print_exc()
|
|
else:
|
|
print("\nSuccessfully imported Zulip settings, models, and actions functions.")
|