[Buildbot-commits] buildbot/buildbot/status/web baseweb.py, 1.7, 1.8
Brian Warner
warner at users.sourceforge.net
Wed Aug 1 22:09:13 UTC 2007
Update of /cvsroot/buildbot/buildbot/buildbot/status/web
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29718/buildbot/status/web
Modified Files:
baseweb.py
Log Message:
[project @ web-refactoring: WebStatus is no longer a ComparableMixin, therefore it will be rebuilt upon each reconfig]
Original author: warner at lothar.com
Date: 2007-08-01 00:47:35+00:00
Index: baseweb.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/web/baseweb.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- baseweb.py 1 Aug 2007 22:08:47 -0000 1.7
+++ baseweb.py 1 Aug 2007 22:09:11 -0000 1.8
@@ -2,15 +2,15 @@
import os, sys
from itertools import count
+from zope.interface import implements
from twisted.python import log
-from twisted.application import strports
+from twisted.application import strports, service
from twisted.web import server, distrib, static
from twisted.spread import pb
-from buildbot.interfaces import IControl
+from buildbot.interfaces import IControl, IStatusReceiver
from buildbot.status.builder import SUCCESS, WARNINGS, FAILURE, EXCEPTION
-from buildbot.status.base import StatusReceiverMultiService
from buildbot.status.web.base import HtmlResource
from buildbot.status.web.waterfall import WaterfallStatusResource
from buildbot.status.web.changes import ChangesResource
@@ -204,7 +204,14 @@
'''
-class WebStatus(StatusReceiverMultiService):
+class WebStatus(service.MultiService):
+ implements(IStatusReceiver)
+ # TODO: IStatusReceiver is really about things which subscribe to hear
+ # about buildbot events. We need a different interface (perhaps a parent
+ # of IStatusReceiver) for status targets that don't subscribe, like the
+ # WebStatus class. buildbot.master.BuildMaster.loadConfig:737 asserts
+ # that everything in c['status'] provides IStatusReceiver, but really it
+ # should check that they provide IStatusTarget instead.
"""
The webserver provided by this class has the following resources:
@@ -265,8 +272,8 @@
"""
- compare_attrs = ["http_port", "distrib_port", "allowForce", "css"]
- # TODO: putChild should cause two instances to compare differently
+ # we are not a ComparableMixin, and therefore the webserver will be
+ # rebuilt every time we reconfig.
def __init__(self, http_port=None, distrib_port=None,
allowForce=False, css="buildbot.css"):
@@ -309,7 +316,7 @@
for the page.
"""
- StatusReceiverMultiService.__init__(self)
+ service.MultiService.__init__(self)
if type(http_port) is int:
http_port = "tcp:%d" % http_port
self.http_port = http_port
@@ -365,7 +372,7 @@
self.distrib_port)
def setServiceParent(self, parent):
- StatusReceiverMultiService.setServiceParent(self, parent)
+ service.MultiService.setServiceParent(self, parent)
self.setupSite()
def setupSite(self):
More information about the Commits
mailing list