Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(daily_usage): Add clock to refresh all daily usage #2735

Merged
merged 6 commits into from
Oct 29, 2024

Conversation

vincent-pochet
Copy link
Collaborator

Context

This PR is part of the Usage Revenue and unit. It follows #2718

Today, Lago does not offer a way to retrieve customer usage with a granularity lower than the billing period (via invoices and fees). On the other end, it is possible to get the current usage for a customer/subscription, but this usage is just a “snapshot” of the usage a the current time.

Description

This PR adds the base logic to compute the daily usage for every active subscription.

For now the feature is enabled by checking the presence of the LAGO_ENABLE_REVENUE_ANALYTICS environment variable.

@vincent-pochet vincent-pochet force-pushed the feat-daily-usage branch 2 times, most recently from 18fb288 to 0e19956 Compare October 24, 2024 10:12
@vincent-pochet vincent-pochet marked this pull request as draft October 24, 2024 11:32
@vincent-pochet vincent-pochet force-pushed the feat-daily-usage branch 4 times, most recently from fd020bf to 950bb1f Compare October 25, 2024 13:44
@vincent-pochet vincent-pochet marked this pull request as ready for review October 25, 2024 14:19
@vincent-pochet vincent-pochet merged commit 296e988 into main Oct 29, 2024
6 checks passed
@vincent-pochet vincent-pochet deleted the feat-daily-usage branch October 29, 2024 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants