mirror of https://github.com/zulip/zulip.git
95dc0894d8
This report will eventually replace the per-realm report that is now accessible through /activity. In order not to disrupt Waseem, I'm leaving the old reports around until we've polished the new ones. The old report does 24 different queries to get per-realm user data. The new approach gets all the data at once, and it slices and dices the data in Python to accomodate our slightly quirky data model. On localhost, this is a typical query: LOG: duration: 5.668 ms statement: SELECT "zerver_useractivity"."id", "zerver_useractivity"."user_profile_id", "zerver_useractivity"."client_id", "zerver_useractivity"."query", "zerver_useractivity"."count", "zerver_useractivity"."last_visit", "zerver_userprofile"."id", "zerver_userprofile"."email", "zerver_client"."id", "zerver_client"."name" FROM "zerver_useractivity" INNER JOIN "zerver_userprofile" ON ("zerver_useractivity"."user_profile_id" = "zerver_userprofile"."id") INNER JOIN "zerver_realm" ON ("zerver_userprofile"."realm_id" = "zerver_realm"."id") INNER JOIN "zerver_client" ON ("zerver_useractivity"."client_id" = "zerver_client"."id") WHERE "zerver_realm"."domain" = 'zulip.com' ORDER BY "zerver_userprofile"."email" ASC, "zerver_useractivity"."last_visit" DESC (imported from commit 0c71f4e32fe5a40f4496749dc29ad3463868d55e) |
||
---|---|---|
.. | ||
__init__.py | ||
authhack.py | ||
backends.py | ||
local_settings.py | ||
local_settings_template.py | ||
settings.py | ||
test_settings.py | ||
urls.py | ||
wsgi.py |