~launchpad-pqm/launchpad/devel

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).
13194.2.1 by Gavin Panella
Change all uses of 'initialise' to 'initialize'.
5
"""Build Jobs initialization."""
8687.15.7 by Karl Fogel
Add the copyright header block to more files.
6
2094 by Canonical.com Patch Queue Manager
[r=spiv,jamesh] Auto Buildd System implementation.
7
__metaclass__ = type
8
3023.2.18 by Celso Providelo
Fix permissions and pythonpath on buildd cronscripts, fix builddmaster to created timestamp-named upload dirs.
9
import _pythonpath
2755 by Canonical.com Patch Queue Manager
[r=stevea] Fixing bug # 2812, loading zcml info in builddmaster and consequently removing the database imports, fixing bug # 1305 by using standards in both buildd cronscripts.
10
5019.1.6 by Christian Robottom Reis
Back out code from revno 5072 (Fix bug 150988 (denying simulataneous runs of builddmaster cronscripts from different
11
from canonical.config import config
8294.6.1 by Julian Edwards
First stab at code-reorg. Still got a discrepancy on stuff I assigned to registry but not migrated yet.
12
from lp.soyuz.scripts.buildd import QueueBuilder
3500.2.22 by Celso Providelo
Fix ftpmaster config missing shipit section, fix cronscript queue-builder (dry-run ability, better debug, low transaction isolation level), builddmaster fixes (spelling, XXX and skipping build retry for released pockets), add changeslist field to distrorelease/+admin UI (replacing i-f-p hack, pagetests), x perms for i-f-p script.
13
2214 by Canonical.com Patch Queue Manager
[trivial] BuildFarm works again, bits repaired and ready for deep redesign.
14
if __name__ == '__main__':
3691.428.5 by Celso Providelo
more review comments.
15
    script = QueueBuilder('queue-builder', dbuser=config.builddmaster.dbuser)
3691.348.22 by kiko
Convert buildd queue builder and slave scanner cronscripts to use LaunchpadScript. Still needs some locking sanity implemented given that they share locks.
16
    script.lock_or_quit()
4006.1.2 by kiko
Make the Soyuz scripts try/finally their script.run() call (so they clean up their locks when they crash)
17
    try:
5152.5.5 by Celso Providelo
Exclude retry-depwait task from buildd-queue-builder.py cronscript and from BuilddMaster helper class. Remove the global buildd_master lockfile dependency, from now on queue-builder can run periodically as a cronjob in parallel with slave-scanner.
18
        script.run()
4006.1.2 by kiko
Make the Soyuz scripts try/finally their script.run() call (so they clean up their locks when they crash)
19
    finally:
20
        script.unlock()