From: Brian Warner Date: Fri, 9 Jan 2009 03:01:45 +0000 (-0700) Subject: immutable/checker: include a summary (with 'Healthy' or 'Not Healthy' and a count... X-Git-Url: https://git.rkrishnan.org/about.html?a=commitdiff_plain;h=f8de336039bb10d3a22b5c74199bbe9f4326b426;p=tahoe-lafs%2Ftahoe-lafs.git immutable/checker: include a summary (with 'Healthy' or 'Not Healthy' and a count of shares) in the checker results --- diff --git a/src/allmydata/immutable/checker.py b/src/allmydata/immutable/checker.py index 6b36a346..653a49da 100644 --- a/src/allmydata/immutable/checker.py +++ b/src/allmydata/immutable/checker.py @@ -227,8 +227,13 @@ class Checker(log.PrefixingLogMixin): assert len(verifiedshares) <= self._verifycap.total_shares, (verifiedshares.keys(), self._verifycap.total_shares) if len(verifiedshares) == self._verifycap.total_shares: cr.set_healthy(True) + cr.set_summary("Healthy") else: cr.set_healthy(False) + cr.set_summary("Not Healthy: %d shares (enc %d-of-%d)" % + (len(verifiedshares), + self._verifycap.needed_shares, + self._verifycap.total_shares)) if len(verifiedshares) >= self._verifycap.needed_shares: cr.set_recoverable(True) d['count-recoverable-versions'] = 1