Separating this from bug 493864. We want to be able to sort by popularity weekly, monthly, and all-time.
Created attachment 380359 [details] [diff] [review] script and db changes for tracking collection popularity
Attachment #380359 - Flags: review?(clouserw)
$db->query() uses the slave db unless you pass in "true" as the second parameter to use the master. So any queries that need to write need to have true in them.
Thanks justin. There's an UPDATE with query on lines 290, 317, 358, 379, 391, probably more. Are you saying that those are all not working? Is there already a better function to use than query, or should I write one?
Oh, it would be nice if this patch used better names than weeklydownloads and monthlydownloads since we're talking about subscribers.
I am just saying instead of doing $db->query("UPDATE"), just do $db->query("UPDATE", true) and everything will work fine. This is what's done in the other bin scripts.
(In reply to comment #5) > Oh, it would be nice if this patch used better names than weeklydownloads and > monthlydownloads since we're talking about subscribers. Why don't you call them something else then? Like weeklysubscribers and monthlysubscribers?
Comment on attachment 380359 [details] [diff] [review] script and db changes for tracking collection popularity r+ if you get rid of the var_dump() and rename the columns
Attachment #380359 - Flags: review?(clouserw) → review+
Tracking weekly_subscribers and monthly_subscribers in r26543.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Created attachment 380383 [details] [diff] [review] alter statements for collections table stats Updated the column names.
Attachment #380360 - Attachment is obsolete: true
The wiki page https://wiki.mozilla.org/Update:Developers/Database_Changes is sad if you ignore it.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Too many things for me to remember!
Status: REOPENED → RESOLVED
Last Resolved: 9 years ago → 9 years ago
Resolution: --- → FIXED
(In reply to comment #12) > Too many things for me to remember! Your brain is full of ridiculous git commands
removing "push-needed" from 105 AMO 5.0.6 bugs; filter on "I hate stephend!"
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.