~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
6623.4.14 by Tim Penhey
Start of the cronscript.
6
# pylint: disable-msg=C0103,W0403
7
8
import _pythonpath
9
10
from canonical.config import config
6623.4.20 by Tim Penhey
Testing the guts of the cron script and creating a dedicated db user.
11
8138.1.2 by Jonathan Lange
Run migrater over lp.code. Many tests broken and imports failing.
12
from lp.code.scripts.revisionkarma import RevisionKarmaAllocator
6623.4.14 by Tim Penhey
Start of the cronscript.
13
14
15
if __name__ == '__main__':
6623.4.20 by Tim Penhey
Testing the guts of the cron script and creating a dedicated db user.
16
    script = RevisionKarmaAllocator('allocate-revision-karma',
17
        dbuser=config.revisionkarma.dbuser)
12415.1.5 by William Grant
Purge implicit_begin/implicitBegin; ignored since Storm.
18
    script.lock_and_run()