~launchpad-pqm/launchpad/devel

8687.15.8 by Karl Fogel
Add the copyright header block to more files.
1
# Copyright 2009 Canonical Ltd.  This software is licensed under the
2
# GNU Affero General Public License version 3 (see the file LICENSE).
7813.2.1 by Celso Providelo
re-basing slave-scanner-ng changes.
3
4
# Twisted Application Configuration file.
5
# Use with "twistd2.4 -y <file.tac>", e.g. "twistd -noy server.tac"
6
7
from twisted.application import service
11121.2.2 by Henning Eggers
Use logile name from command line options.
8
from twisted.scripts.twistd import ServerOptions
7813.2.1 by Celso Providelo
re-basing slave-scanner-ng changes.
9
from twisted.web import server
10
8426.7.4 by Julian Edwards
mop up some top level scripts with bad imports.
11
from lp.buildmaster.manager import BuilddManager
11121.2.1 by Henning Eggers
Implemented RotatableFileLogObserver.
12
from lp.services.twistedsupport.loggingsupport import RotatableFileLogObserver
7813.2.11 by Celso Providelo
Operating in Zopeless mode and including better logging support.
13
from canonical.config import config
11765.1.1 by Robert Collins
Split out the launchpad-buildd needed component from tachandler.py.
14
from canonical.launchpad.daemons import readyservice
7813.2.1 by Celso Providelo
re-basing slave-scanner-ng changes.
15
from canonical.launchpad.scripts import execute_zcml_for_scripts
7813.2.11 by Celso Providelo
Operating in Zopeless mode and including better logging support.
16
from canonical.lp import initZopeless
7813.2.1 by Celso Providelo
re-basing slave-scanner-ng changes.
17
18
execute_zcml_for_scripts()
7813.2.11 by Celso Providelo
Operating in Zopeless mode and including better logging support.
19
initZopeless(dbuser=config.builddmaster.dbuser)
7813.2.1 by Celso Providelo
re-basing slave-scanner-ng changes.
20
11121.2.2 by Henning Eggers
Use logile name from command line options.
21
options = ServerOptions()
22
options.parseOptions()
23
7813.2.1 by Celso Providelo
re-basing slave-scanner-ng changes.
24
application = service.Application('BuilddManager')
11121.2.1 by Henning Eggers
Implemented RotatableFileLogObserver.
25
application.addComponent(
11121.2.2 by Henning Eggers
Use logile name from command line options.
26
    RotatableFileLogObserver(options.get('logfile')), ignoreClass=1)
8486.7.1 by Celso Providelo
Fixing bug #380848 (buildd-manager circular imports, also testing if the TAC file starts and stops correctly).
27
28
# Service that announces when the daemon is ready.
11765.1.1 by Robert Collins
Split out the launchpad-buildd needed component from tachandler.py.
29
readyservice.ReadyService().setServiceParent(application)
8486.7.1 by Celso Providelo
Fixing bug #380848 (buildd-manager circular imports, also testing if the TAC file starts and stops correctly).
30
31
# Service for scanning buildd slaves.
7813.2.1 by Celso Providelo
re-basing slave-scanner-ng changes.
32
service = BuilddManager()
33
service.setServiceParent(application)
8486.7.1 by Celso Providelo
Fixing bug #380848 (buildd-manager circular imports, also testing if the TAC file starts and stops correctly).
34