mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-03-10 14:34:05 +00:00
Rename a parameter for clarity
"context" is nevow terminology, whereas these are really requests.
This commit is contained in:
parent
5ec78641db
commit
bbee23b493
@ -50,12 +50,12 @@ class OphandleTable(resource.Resource, service.Service):
|
|||||||
del self.timers
|
del self.timers
|
||||||
return service.Service.stopService(self)
|
return service.Service.stopService(self)
|
||||||
|
|
||||||
def add_monitor(self, ctx, monitor, renderer):
|
def add_monitor(self, req, monitor, renderer):
|
||||||
ophandle = get_arg(ctx, "ophandle")
|
ophandle = get_arg(req, "ophandle")
|
||||||
assert ophandle
|
assert ophandle
|
||||||
now = time.time()
|
now = time.time()
|
||||||
self.handles[ophandle] = (monitor, renderer, now)
|
self.handles[ophandle] = (monitor, renderer, now)
|
||||||
retain_for = get_arg(ctx, "retain-for", None)
|
retain_for = get_arg(req, "retain-for", None)
|
||||||
if retain_for is not None:
|
if retain_for is not None:
|
||||||
self._set_timer(ophandle, int(retain_for))
|
self._set_timer(ophandle, int(retain_for))
|
||||||
monitor.when_done().addBoth(self._operation_complete, ophandle)
|
monitor.when_done().addBoth(self._operation_complete, ophandle)
|
||||||
@ -72,11 +72,11 @@ class OphandleTable(resource.Resource, service.Service):
|
|||||||
# if we already have a timer, the client must have provided the
|
# if we already have a timer, the client must have provided the
|
||||||
# retain-for= value, so don't touch it.
|
# retain-for= value, so don't touch it.
|
||||||
|
|
||||||
def redirect_to(self, ctx):
|
def redirect_to(self, req):
|
||||||
ophandle = get_arg(ctx, "ophandle")
|
ophandle = get_arg(req, "ophandle")
|
||||||
assert ophandle
|
assert ophandle
|
||||||
target = get_root(ctx) + "/operations/" + ophandle
|
target = get_root(req) + "/operations/" + ophandle
|
||||||
output = get_arg(ctx, "output")
|
output = get_arg(req, "output")
|
||||||
if output:
|
if output:
|
||||||
target = target + "?output=%s" % output
|
target = target + "?output=%s" % output
|
||||||
return url.URL.fromString(target)
|
return url.URL.fromString(target)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user