Store and calculate Total Contributions figures for add-ons

RESOLVED FIXED in 5.11.3

Status

defect
RESOLVED FIXED
9 years ago
3 years ago

People

(Reporter: potch, Assigned: davedash)

Tracking

Details

(Whiteboard: [qa-])

(Reporter)

Description

9 years ago
for the stats page, we need a figure for the total amount contributed all-time for a particular add-on, which is data we currently don't maintain.
The paypal responder should fire off a task to update the aggregate.  It'll be our first real-timeish use of celery!  It should be able to run under cron too for updating the world.
Assignee: thepotch → dd
Target Milestone: --- → 5.11.3
Any reason to not have a post_save signal on Contribution fire off the task?

That would take care of paypal.  

What does doing this via cron get us?  If we update on save it should cover our bases.
Status: NEW → ASSIGNED
Running as a task should be the main use case, but I like to have the ability to run through cron as a safety net.  I'm doing this for reviews here: http://github.com/jbalogh/zamboni/commit/fa73fb3a
http://github.com/jbalogh/zamboni/commits/d3f378b
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
(zamboni)$ pyflakes apps/stats/cron.py
apps/stats/cron.py:4: 'task' imported but unused
apps/stats/cron.py:10: 'CollectionAddon' imported but unused
apps/stats/cron.py:23: undefined name 'Sum'
apps/stats/cron.py:36: undefined name 'Sum'
apps/stats/cron.py:49: undefined name '_get_daily_jobs'
apps/stats/cron.py:51: undefined name 'Max'
apps/stats/cron.py:52: undefined name '_get_metrics_jobs'
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Fixed in:

http://github.com/jbalogh/zamboni/commits/91b88f0
Status: REOPENED → RESOLVED
Last Resolved: 9 years ago9 years ago
Resolution: --- → FIXED
(zamboni)$ pyflakes apps/stats/tasks.py                         ~/dev/zamboni (read-only)
apps/stats/tasks.py:5: 'post_save' imported but unused
apps/stats/tasks.py:46: undefined name 'CollectionAddon'
apps/stats/tasks.py:145: undefined name 'AddonCollectionCount'
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
This doesn't happen for me.  Are you on master?
Status: REOPENED → RESOLVED
Last Resolved: 9 years ago9 years ago
Resolution: --- → FIXED
[qa-] worthy?
Whiteboard: [qa-]
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.