From: Brian Warner Date: Fri, 13 Mar 2009 05:47:28 +0000 (-0700) Subject: consolidator: add progress to scan-old-directory passes X-Git-Tag: allmydata-tahoe-1.4.0~59 X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/simplejson/encoder.py.html?a=commitdiff_plain;h=a18f8d4cc725e671ceb474453d42915e0abeac21;p=tahoe-lafs%2Ftahoe-lafs.git consolidator: add progress to scan-old-directory passes --- diff --git a/src/allmydata/scripts/consolidate.py b/src/allmydata/scripts/consolidate.py index 335bfeb8..5dcec8a2 100644 --- a/src/allmydata/scripts/consolidate.py +++ b/src/allmydata/scripts/consolidate.py @@ -144,7 +144,8 @@ class Consolidator: data = self.read_directory_json(archives_dircap) snapshots = {} - for (childname, (childtype, childdata)) in data["children"].items(): + children = sorted(data["children"].items()) + for i, (childname, (childtype, childdata)) in enumerate(children): if childtype != "dirnode": self.msg("non-dirnode %s in Archives/" % childname) continue @@ -160,6 +161,8 @@ class Consolidator: if is_readonly: readcap = str(childdata["ro_uri"]) if self.must_rescan_readonly_snapshots: + self.msg(" scanning old %s (%d/%d)" % + (childname, i+1, len(children))) self.scan_old_directory(str(childdata["ro_uri"])) snapshots[timestamp][2] = childname snapshots[timestamp][3] = readcap