10637.3.1
by Guilherme Salgado
Use the default python version instead of a hard-coded version |
1 |
#!/usr/bin/python -S
|
7675.524.2
by Graham Binns
Added cronscript and tests (which fail, but baby steps, eh?). |
2 |
#
|
3 |
# Copyright 2010 Canonical Ltd. This software is licensed under the
|
|
4 |
# GNU Affero General Public License version 3 (see the file LICENSE).
|
|
5 |
||
6 |
# pylint: disable-msg=W0403
|
|
7 |
||
8 |
"""Process uploaded Apport BLOBs."""
|
|
9 |
||
10 |
__metaclass__ = type |
|
11 |
||
12 |
import _pythonpath |
|
13 |
||
14 |
from canonical.launchpad.webapp import errorlog |
|
15 |
||
16 |
from lp.services.job.runner import JobCronScript |
|
17 |
from lp.bugs.interfaces.apportjob import IProcessApportBlobJobSource |
|
18 |
||
19 |
||
20 |
class RunProcessApportBlobs(JobCronScript): |
|
21 |
"""Run ProcessApportBlobJobs."""
|
|
22 |
||
23 |
config_name = 'process_apport_blobs' |
|
24 |
source_interface = IProcessApportBlobJobSource |
|
25 |
||
26 |
def main(self): |
|
27 |
errorlog.globalErrorUtility.configure(self.config_name) |
|
28 |
return super(RunProcessApportBlobs, self).main() |
|
29 |
||
30 |
||
31 |
if __name__ == '__main__': |
|
32 |
script = RunProcessApportBlobs() |
|
33 |
script.lock_and_run() |