10637.3.1
by Guilherme Salgado
Use the default python version instead of a hard-coded version |
1 |
#!/usr/bin/python -S
|
8687.15.7
by Karl Fogel
Add the copyright header block to more files. |
2 |
#
|
3 |
# Copyright 2009 Canonical Ltd. This software is licensed under the
|
|
4 |
# GNU Affero General Public License version 3 (see the file LICENSE).
|
|
7675.85.2
by Jonathan Lange
Undo revision generated by step 2 of process. |
5 |
|
6 |
"""Database garbage collector.
|
|
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 |
|
12854.1.2
by Gavin Panella
Format imports, fix lint. |
16 |
|
11703.1.1
by Tim Penhey
Move the garbo script into lp.scripts. |
17 |
from lp.scripts.garbo import HourlyDatabaseGarbageCollector |
7675.85.2
by Jonathan Lange
Undo revision generated by step 2 of process. |
18 |
|
12854.1.2
by Gavin Panella
Format imports, fix lint. |
19 |
|
7675.85.2
by Jonathan Lange
Undo revision generated by step 2 of process. |
20 |
if __name__ == '__main__': |
21 |
script = HourlyDatabaseGarbageCollector() |
|
8579.2.3
by Stuart Bishop
Refactor HWSubmission linking and allow garbo to continue even if one tunable loop died |
22 |
script.continue_on_failure = True |
8758.6.9
by Stuart Bishop
Reenable script locking to avoid backlogged cronscripts spamming the same log file |
23 |
script.lock_and_run() |