~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to cronscripts/garbo-frequently.py

  • Committer: Stuart Bishop
  • Date: 2011-07-29 11:11:06 UTC
  • mto: (8758.7.1 garbo-bulk-pruner)
  • mto: This revision was merged to the branch mainline in revision 13926.
  • Revision ID: stuart.bishop@canonical.com-20110729111106-h63agoq0s5hcvp62
Add garbo-frequently

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python -S
 
2
#
 
3
# Copyright 2011 Canonical Ltd.  This software is licensed under the
 
4
# GNU Affero General Public License version 3 (see the file LICENSE).
 
5
 
 
6
"""Database garbage collector, every 5 minutes.
 
7
 
 
8
Remove or archive unwanted data. Detect, warn and possibly repair data
 
9
corruption.
 
10
"""
 
11
 
 
12
__metaclass__ = type
 
13
__all__ = []
 
14
 
 
15
import _pythonpath
 
16
 
 
17
from lp.scripts.garbo import FrequentDatabaseGarbageCollector
 
18
 
 
19
 
 
20
if __name__ == '__main__':
 
21
    script = FrequentDatabaseGarbageCollector()
 
22
    script.continue_on_failure = True
 
23
    script.lock_and_run()