summaryrefslogtreecommitdiffstats
path: root/munin/publik_count
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2021-05-27 07:05:49 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2021-05-27 07:05:49 (GMT)
commit18002c532faf913b854d79e3e492d96ba8800464 (patch)
tree961acd93e0759b6b6901ad258b6834f034c76f2e /munin/publik_count
parentaf4a5292d86ab7f44dfb83e3e9a27da0d8aeda57 (diff)
downloadmisc-fred-18002c532faf913b854d79e3e492d96ba8800464.zip
misc-fred-18002c532faf913b854d79e3e492d96ba8800464.tar.gz
misc-fred-18002c532faf913b854d79e3e492d96ba8800464.tar.bz2
munin: update for new tenants/ subdirectory
Diffstat (limited to 'munin/publik_count')
-rwxr-xr-xmunin/publik_count7
1 files changed, 5 insertions, 2 deletions
diff --git a/munin/publik_count b/munin/publik_count
index 1b65e79..6f61867 100755
--- a/munin/publik_count
+++ b/munin/publik_count
@@ -1,8 +1,11 @@
#! /usr/bin/env python
+#%# family=auto
+#%# capabilities=autoconf
import cPickle
import os
import psycopg2
+import itertools
import sys
base_dir = None
@@ -27,8 +30,8 @@ count.label Count
total = 0
-for tenant in os.listdir(base_dir):
- if tenant in ('collectstatic', 'scripts', 'skeletons', 'spooler'):
+for tenant in itertools.chain(os.listdir(base_dir), os.listdir(os.path.join(base_dir, 'tenants')):
+ if tenant in ('collectstatic', 'scripts', 'skeletons', 'spooler', 'tenants'):
continue
if tenant.endswith('.invalid'):
continue