Closed Bug 494499 Opened 15 years ago Closed 15 years ago

maintenance.php script for tracking collection popularity

Categories

(addons.mozilla.org Graveyard :: Collections, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jbalogh, Assigned: jbalogh)

Details

Attachments

(2 files, 1 obsolete file)

Separating this from bug 493864.  We want to be able to sort by popularity weekly, monthly, and all-time.
$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
Closed: 15 years ago
Keywords: push-needed
Resolution: --- → FIXED
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
Closed: 15 years ago15 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!"
Keywords: push-needed
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: