diff options
| author | Marko Kreen | 2010-12-01 13:20:38 +0000 |
|---|---|---|
| committer | Marko Kreen | 2010-12-01 13:20:38 +0000 |
| commit | 67597d1c74eb581430d1218c28cbe402059e5f1b (patch) | |
| tree | 5c21da3da8dd265cadbe0b67c8b1486f22d48bb9 /python/londiste/setup.py | |
| parent | cdc972f6b2e863fd895fe16665d19d83bc9e17f0 (diff) | |
londiste: show table counts in 'status'
Diffstat (limited to 'python/londiste/setup.py')
| -rw-r--r-- | python/londiste/setup.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/python/londiste/setup.py b/python/londiste/setup.py index e8b20310..fc1ddd58 100644 --- a/python/londiste/setup.py +++ b/python/londiste/setup.py @@ -453,3 +453,17 @@ class LondisteSetup(CascadeAdmin): raise UsageError("Cannot proceed") return res_list + def load_extra_status(self, curs, node): + """Fetch extra info.""" + CascadeAdmin.load_extra_status(self, curs, node) + curs.execute("select * from londiste.get_table_list(%s)", [self.queue_name]) + n_ok = n_half = n_ign = 0 + for tbl in curs.fetchall(): + if not tbl['local']: + n_ign += 1 + elif tbl['merge_state'] == 'ok': + n_ok += 1 + else: + n_half += 1 + node.add_info_line('Tables: %d/%d/%d' % (n_ok, n_half, n_ign)) + |
