mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 05:28:04 +00:00
get rid of child_operations from root
This commit is contained in:
parent
191087ef0a
commit
569454b1a3
@ -154,12 +154,6 @@ class Root(MultiFormatPage):
|
|||||||
def __init__(self, client, clock=None, now_fn=None):
|
def __init__(self, client, clock=None, now_fn=None):
|
||||||
rend.Page.__init__(self, client)
|
rend.Page.__init__(self, client)
|
||||||
self.client = client
|
self.client = client
|
||||||
# If set, clock is a twisted.internet.task.Clock that the tests
|
|
||||||
# use to test ophandle expiration.
|
|
||||||
self.child_operations = operations.OphandleTable(clock)
|
|
||||||
self.putChild("operations", self.child_operations)
|
|
||||||
# XXX get rid of self.child_operations entirely when we remove the .remember() usage in webish
|
|
||||||
|
|
||||||
self.now_fn = now_fn
|
self.now_fn = now_fn
|
||||||
try:
|
try:
|
||||||
s = client.getServiceNamed("storage")
|
s = client.getServiceNamed("storage")
|
||||||
|
@ -11,6 +11,7 @@ from allmydata.util import log, fileutil
|
|||||||
|
|
||||||
from allmydata.web import introweb, root
|
from allmydata.web import introweb, root
|
||||||
from allmydata.web.common import MyExceptionHandler
|
from allmydata.web.common import MyExceptionHandler
|
||||||
|
from allmydata.web.operations import OphandleTable
|
||||||
|
|
||||||
# we must override twisted.web.http.Request.requestReceived with a version
|
# we must override twisted.web.http.Request.requestReceived with a version
|
||||||
# that doesn't use cgi.parse_multipart() . Since we actually use Nevow, we
|
# that doesn't use cgi.parse_multipart() . Since we actually use Nevow, we
|
||||||
@ -165,10 +166,11 @@ class WebishServer(service.MultiService):
|
|||||||
self.root = root.Root(client, clock, now_fn)
|
self.root = root.Root(client, clock, now_fn)
|
||||||
self.buildServer(webport, nodeurl_path, staticdir)
|
self.buildServer(webport, nodeurl_path, staticdir)
|
||||||
|
|
||||||
# XXX just make this 'child_operations' thing something we
|
# If set, clock is a twisted.internet.task.Clock that the tests
|
||||||
# pass to Root instead .. then can we pass it to OpHandleTable() as well?
|
# use to test ophandle expiration.
|
||||||
if self.root.child_operations:
|
operations = OphandleTable(clock)
|
||||||
self.root.child_operations.setServiceParent(self)
|
operations.setServiceParent(self)
|
||||||
|
self.root.putChild("operations", operations)
|
||||||
|
|
||||||
def buildServer(self, webport, nodeurl_path, staticdir):
|
def buildServer(self, webport, nodeurl_path, staticdir):
|
||||||
self.webport = webport
|
self.webport = webport
|
||||||
|
Loading…
Reference in New Issue
Block a user