~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to cronscripts/garbo-frequently.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-09-12 21:08:41 UTC
  • mfrom: (8758.3.25 garbo)
  • Revision ID: launchpad@pqm.canonical.com-20110912210841-qyag5sunk3vo01we
[r=bac][bug=795305] Add garbo-frequently for every 5 mins tasks,
        reduce transaction target to 2 seconds,
        rollup bugsummary journal in garbo-grequently.

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