~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.22 by Karl Fogel
Add the copyright header block to the remaining .py 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
10344.2.6 by Julian Edwards
remove lint warning
6
# Stop pylint complaining about the _pythonpath relative import.
7
# pylint: disable-msg=W0403
8
2756 by Canonical.com Patch Queue Manager
Queue-Accepted processor and some upload tweaks to fit it. r=stevea
9
"""Queue/Accepted processor
10
11
Given a distribution to run on, obtains all the queue items for the
8447.1.2 by Jonathan Lange
Fix up lots of lint, including removing code that's been disabled forever.
12
distribution and then gets on and deals with any accepted items, preparing
13
them for publishing as appropriate.
2756 by Canonical.com Patch Queue Manager
Queue-Accepted processor and some upload tweaks to fit it. r=stevea
14
"""
15
4590.1.1 by Julian Edwards
Re-add an import _pythonpath that make lint told us to remove :/
16
import _pythonpath
17
2756 by Canonical.com Patch Queue Manager
Queue-Accepted processor and some upload tweaks to fit it. r=stevea
18
from canonical.config import config
5842.1.1 by James Henstridge
Rename the transaction isolation level constants to match the psycopg2
19
from canonical.database.sqlbase import ISOLATION_LEVEL_READ_COMMITTED
10344.2.3 by Julian Edwards
get the script running
20
from lp.soyuz.scripts.processaccepted import ProcessAccepted
2756 by Canonical.com Patch Queue Manager
Queue-Accepted processor and some upload tweaks to fit it. r=stevea
21
22
23
if __name__ == '__main__':
10344.2.2 by Julian Edwards
the top level script now calls the LPScript
24
    script = ProcessAccepted(
10344.2.3 by Julian Edwards
get the script running
25
        "process-accepted", dbuser=config.uploadqueue.dbuser)
26
    script.lock_and_run(isolation=ISOLATION_LEVEL_READ_COMMITTED)
2756 by Canonical.com Patch Queue Manager
Queue-Accepted processor and some upload tweaks to fit it. r=stevea
27