~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to cronscripts/scan_branches.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-06-21 01:24:40 UTC
  • mfrom: (13168.9.8 auto-upgrade-fix)
  • Revision ID: launchpad@pqm.canonical.com-20110621012440-waa76gmxu72in1i8
[r=henninge][bug=798560] Use scanner-compatible directory names when
        upgrading code import branches.

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