diff --git a/src/allmydata/web/directory.py b/src/allmydata/web/directory.py index 344404529..2b010eec9 100644 --- a/src/allmydata/web/directory.py +++ b/src/allmydata/web/directory.py @@ -1295,18 +1295,24 @@ class DeepSizeResults(MultiFormatPage): } return json.dumps(status) + class DeepStatsResults(Resource): + """ + Renders the results of a 'deep-stats' operation on a directory + capability. + """ def __init__(self, client, monitor): self.client = client self.monitor = monitor - def renderHTTP(self, req): + def render(self, req): # JSON only req.setHeader("content-type", "text/plain") s = self.monitor.get_status().copy() s["finished"] = self.monitor.is_finished() return json.dumps(s, indent=1) + @implementer(IPushProducer) class ManifestStreamer(dirnode.DeepStats):