zulip/analytics
Lauryn Menard dcae35196c remote-activity: Prefetch LicenseLedger entry for current plan.
To estimate the annual recurring revenue for remote server and
remote realm CustomerPlans, we prefetch the current license
ledger as part of the CustomerPlan query.

Also adds a select related to the remote realm audit log query
so that we don't go to the database for the remote realm ID.

With the test added in the previous commit, the query count for
the remote activity view goes from 27 to 11, as we are no longer
hitting the database multiple times for every current plan or
for every remote realm with audit log data.

Refactors get_customer_plan_renewal_amount so that a license
ledger is always passed and make_end_of_cycle_updates_if_needed
does not need to be called.
2024-01-25 15:35:44 -08:00
..
lib analytics: Move logging config into LOGGING, use "zulip.analytics". 2023-11-21 10:49:57 -08:00
management models: Extract zerver.models.groups. 2023-12-16 22:08:44 -08:00
migrations analytics: Regenerate partial indexes due to Django bug. 2023-11-16 13:53:04 -08:00
tests remote-activity: Prefetch LicenseLedger entry for current plan. 2024-01-25 15:35:44 -08:00
views remote-activity: Update column data for remote realms. 2024-01-22 11:55:31 -08:00
__init__.py
models.py python: Consistently use from…import for datetime. 2023-12-05 12:01:18 -08:00
urls.py analytics: More fixes to zilencer urls import logic. 2023-12-05 10:52:00 -08:00