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).
|
|
6206.2.9
by Barry Warsaw
Add the actual cron script, and tests to be sure the cron script works via |
5 |
|
6 |
"""A cron script for updating personal standings."""
|
|
7 |
||
8 |
__metaclass__ = type |
|
9 |
__all__ = [] |
|
10 |
||
11 |
||
6206.2.10
by Barry Warsaw
clean up lint |
12 |
# pylint: disable-msg=W0403
|
6206.2.9
by Barry Warsaw
Add the actual cron script, and tests to be sure the cron script works via |
13 |
import _pythonpath |
14 |
||
6206.2.11
by Barry Warsaw
Run update-standing.py as the right dbuser. |
15 |
from canonical.config import config |
7675.110.3
by Curtis Hovey
Ran the migration script to move registry code to lp.registry. |
16 |
from lp.registry.scripts.standing import UpdatePersonalStanding |
6206.2.9
by Barry Warsaw
Add the actual cron script, and tests to be sure the cron script works via |
17 |
|
18 |
||
19 |
if __name__ == '__main__': |
|
6206.2.11
by Barry Warsaw
Run update-standing.py as the right dbuser. |
20 |
script = UpdatePersonalStanding( |
21 |
'update-personal-standing', |
|
22 |
dbuser=config.standingupdater.dbuser) |
|
6206.2.9
by Barry Warsaw
Add the actual cron script, and tests to be sure the cron script works via |
23 |
script.lock_and_run() |