~launchpad-pqm/launchpad/devel

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Copyright 2009 Canonical Ltd.  This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).

# Twisted Application Configuration file.
# Use with "twistd2.4 -y <file.tac>", e.g. "twistd -noy server.tac"

import os

from twisted.application import service, internet, strports
from twisted.web import server

from canonical.launchpad.daemons import tachandler
from lp.registry.tests.distributionmirror_http_server import (
    DistributionMirrorTestHTTPServer)


application = service.Application('DistributionMirrorTestHTTPServer')
httpserverService = service.IServiceCollection(application)

# Service that announces when the daemon is ready
tachandler.ReadyService().setServiceParent(httpserverService)

root = DistributionMirrorTestHTTPServer()
site = server.Site(root)
site.displayTracebacks = False
# XXX: Guilherme Salgado 2007-01-30: The port 11375 is what we use in the
# URLs of our mirrors in sampledata, so we need to use the same here.
strports.service("11375", site).setServiceParent(httpserverService)