Closed
Bug 768136
Opened 13 years ago
Closed 13 years ago
Garbage collect marketplace
Categories
(Marketplace Graveyard :: Code Quality, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
2012-07-26
People
(Reporter: robhudson, Assigned: jrconlin)
Details
AMO has a garbage collection cron:
https://github.com/mozilla/zamboni/blob/master/apps/amo/cron.py#L29
ActivityLogs now are settings based to append a '_mkt' to the tables. Either we add a new cron to run this same script so the '_mkt' tables are GC'd, or we set up marketplace with its own garbage collection cron with the AMO stuff stripped out.
Comment 1•13 years ago
|
||
We can add the _mkt tables to the current function
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → jrconlin
Comment 2•13 years ago
|
||
Running the exact same cron with a different settings file, eg: settings_local_mkt will do the job. Presuming that the job only touches the _mkt tables, or running it on the same tables multiple times won't hurt them.
Assignee | ||
Comment 3•13 years ago
|
||
Digging into the code, I was about to suggest this. It appears that all the accessor code is wrapped by ActivityLog and like classes. Looking into the data to confirm that the various *_SUFFIX settings are applied the appropriate tables. (Since this will also give me a better idea of how the data is structured in marketplace.)
Comment 4•13 years ago
|
||
That makes life easy then. This bug is just a matter of adding a new line to https://github.com/mozilla/zamboni/blob/master/scripts/crontab/crontab.tpl then
Reporter | ||
Comment 5•13 years ago
|
||
(In reply to Andy McKay [:andym] from comment #2)
> Presuming that the job only touches the
> _mkt tables, or running it on the same tables multiple times won't hurt them.
The AMO cron does a lot. It's probably ok, but it might be worthwhile to copy the GC over to mkt and strip out everything except the ActivityLog stuff. If there's market specific GC we need later it can go in the mkt GC. Anything shared would be picked up by the AMO GC.
Assignee | ||
Comment 6•13 years ago
|
||
My only concern here is that there would be two commands, gc and gc_* where * is whatever sub-application. There's already at least one, "mkt".
Since there is strong discussion to eventually cleanly separate "market" from "amo" then this may not be an issue. If we are not planning on separating the two, then we should try and keep the code similar, and control this via configuration or other product specific means.
Reporter | ||
Comment 7•13 years ago
|
||
I can't speak to the future plans of market and AMO, so I'll defer to someone else on that. I think we can run with your pull request for now... if there's any fallout from running the GC twice, we can fix it later.
Comment 8•13 years ago
|
||
Long term pla is still to merge AMO into the marketplace and have only marketplace.m.o.
Comment 9•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2012-07-26
You need to log in
before you can comment on or make changes to this bug.
Description
•