From a18f8d4cc725e671ceb474453d42915e0abeac21 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Thu, 12 Mar 2009 22:47:28 -0700 Subject: [PATCH] consolidator: add progress to scan-old-directory passes --- src/allmydata/scripts/consolidate.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.45.2