~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to cronscripts/garbo-frequently.py

  • Committer: Curtis Hovey
  • Date: 2011-08-18 20:56:37 UTC
  • mto: This revision was merged to the branch mainline in revision 13736.
  • Revision ID: curtis.hovey@canonical.com-20110818205637-ae0pf9aexdea2mlb
Cleaned up doctrings and hushed lint.

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()