~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to cronscripts/scan_branches.py

  • Committer: Curtis Hovey
  • Date: 2011-06-21 14:04:50 UTC
  • mfrom: (13270 devel)
  • mto: This revision was merged to the branch mainline in revision 13272.
  • Revision ID: curtis.hovey@canonical.com-20110621140450-sx2v4584sla4urfc
Merged devel

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 
10
10
import _pythonpath
11
11
 
12
 
import resource
13
 
 
14
 
from lp.services.job.runner import JobCronScript
15
12
from lp.code.interfaces.branchjob import IBranchScanJobSource
 
13
from lp.services.job.runner import (
 
14
    JobCronScript,
 
15
    TwistedJobRunner,
 
16
    )
16
17
 
17
18
 
18
19
class RunScanBranches(JobCronScript):
21
22
    config_name = 'branchscanner'
22
23
    source_interface = IBranchScanJobSource
23
24
 
 
25
    def __init__(self):
 
26
        super(RunScanBranches, self).__init__(runner_class=TwistedJobRunner)
 
27
 
24
28
 
25
29
if __name__ == '__main__':
26
30
 
27
 
    resource.setrlimit(resource.RLIMIT_AS, (2L << 30, 2L << 30))
28
 
 
29
31
    script = RunScanBranches()
30
32
    script.lock_and_run()