fix rrd.py for real

legacy
Nils Schneider 2014-08-17 19:31:14 +02:00
parent a5cb5f0fdb
commit 3780fb6cb1
1 changed files with 3 additions and 3 deletions

6
rrd.py
View File

@ -27,11 +27,11 @@ class rrd:
os.mkdir(self.imagePath) os.mkdir(self.imagePath)
def update_database(self,db): def update_database(self,db):
nodes = {} nodes = db.get_nodes()
clientCount = sum(map(lambda d: d.clientcount, db.get_nodes())) clientCount = sum(map(lambda d: d.clientcount, nodes))
self.globalDb.update(len(nodes), clientCount) self.globalDb.update(len(nodes), clientCount)
for node in nodes.values(): for node in nodes:
rrd = NodeRRD( rrd = NodeRRD(
os.path.join(self.dbPath, str(node.id).replace(':', '') + '.rrd'), os.path.join(self.dbPath, str(node.id).replace(':', '') + '.rrd'),
node node