~launchpad-pqm/launchpad/devel

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).
5
4935.3.7 by Curtis Hovey
Added bad name suppression to cronscripts.
6
# pylint: disable-msg=C0103,W0403
4230.2.1 by Jeroen Vermeulen
Moves auto-approval of translation imports to separate, asynchronous scripts; restructures import loop a bit, and explicitly restarts finished transactions.
7
4230.2.2 by Jeroen Vermeulen
Documentation changes based on review
8
"""Perform auto-approvals and auto-blocks on translation import queue"""
9
4230.2.1 by Jeroen Vermeulen
Moves auto-approval of translation imports to separate, asynchronous scripts; restructures import loop a bit, and explicitly restarts finished transactions.
10
import _pythonpath
11
9480.5.6 by Jeroen Vermeulen
Review changes. Renamed auto-approval script.
12
from lp.translations.scripts.import_queue_gardener import ImportQueueGardener
4230.2.1 by Jeroen Vermeulen
Moves auto-approval of translation imports to separate, asynchronous scripts; restructures import loop a bit, and explicitly restarts finished transactions.
13
14
15
if __name__ == '__main__':
9480.5.6 by Jeroen Vermeulen
Review changes. Renamed auto-approval script.
16
    script = ImportQueueGardener(
17
        'translations-import-queue-gardener',
18
        dbuser='translations_import_queue_gardener')
9480.5.1 by Jeroen Vermeulen
Split out approval script code. Clean up queues for obsolete distroseries. Prepare for gc'ing Failed entries.
19
    script.lock_and_run()