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 |
||
14612.2.8
by William Grant
cronscripts |
14 |
from lp.bugs.interfaces.apportjob import IProcessApportBlobJobSource |
15 |
from lp.services.job.runner import JobCronScript |
|
14600.2.2
by Curtis Hovey
Moved webapp to lp.services. |
16 |
from lp.services.webapp import errorlog |
7675.524.2
by Graham Binns
Added cronscript and tests (which fail, but baby steps, eh?). |
17 |
|
18 |
||
19 |
class RunProcessApportBlobs(JobCronScript): |
|
20 |
"""Run ProcessApportBlobJobs."""
|
|
21 |
||
22 |
config_name = 'process_apport_blobs' |
|
23 |
source_interface = IProcessApportBlobJobSource |
|
24 |
||
25 |
def main(self): |
|
26 |
errorlog.globalErrorUtility.configure(self.config_name) |
|
27 |
return super(RunProcessApportBlobs, self).main() |
|
28 |
||
29 |
||
30 |
if __name__ == '__main__': |
|
31 |
script = RunProcessApportBlobs() |
|
32 |
script.lock_and_run() |