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

Fix to exclude downloads of public plans with no user id usually associated with robots #3460

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

johnpinto1
Copy link
Contributor

@johnpinto1 johnpinto1 commented Oct 17, 2024

Fix to exclude downloads of public plans with no user id associated with download, as most of these downloads are associated with robots.

Change:

  • We exclude the count of downloads in export_plans table for which user_id is nil.

To Test:

  • First, get a snapshot of the monthly download for an org. We are interested in recent stats (when robots seem to start downloading public plans), e,g.,

BeforeChangeMonthlyDownloads_UOE

  • Now we need to delete the data in the stats table before we regenerate it with:

    DELETE from stats;

  • Now run (this could take 15 - 30 min)

    bundle exec rails stat:build

  • Now you should be able download the usage monthly stats again for your org and get something with download figures reduced drastically for recent period.

AfterChangeMonthlyDownloads_UOE

download, as most of these downloads are associated with robots.

Change:
 - We exclude the count of downloads in export_plans table for which
   user_id is nil.
@johnpinto1 johnpinto1 force-pushed the fix-for-export-downloads-stat-to-exclude-exports-with-no-user_id branch from 04c25a0 to ee6c76d Compare October 17, 2024 13:50
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