Update:Remora Download Counting
Jump to navigation
Jump to search
http://lxr.mozilla.org/webtools/source/addons/shared/bin/maintenance.php
Old script - weekly downloads were kept as records in downloads using downloads.downloadcount.
- unless there is a good reason to deviate from this, we should keep that method.
New schema has addons.weeklydownloads in addition to addons.totaldownloads - do we now want to stop using the downloads table to keep counts, and keep them both in the addons table?
- the old schema had two columns - main.totaldownloads and main.downloadcount
- totaldownloads had total downloads, and downloadcount had the weekly count
Weeklydownloads are only for the last 7 days since the maintenance script was run?
- the maintenance script only deletes the last 8 days, erring on the side of caution
- downloadcount -> weeklydownloads
- totaldownloads -> totaldownloads
- Both of these mappings are in the migration notes
- As for using Cake for this, I don't think it really matters what we use. The existing maintenance script could actually be used as-is with modifications to the SQL. Because it is not in Cake it would make it harder to test, though, so if moving it to Cake seems like the right thing, that I'm all for it. It's arguable that creating tests for the existing script is an arbitrary effort. You'd want to test that:
- Counts don't get counted twice
- 7+ day-old counts aren't lingering
- 7-day counts in addons.weeklydownloads match what's in the DB?