diff web/log.py @ 32:e18d7e89c17d

More minor work
author Matt Johnston <matt@ucc.asn.au>
date Thu, 14 Jun 2012 00:00:57 +0800
parents 5e75e08d20ac
children 024f5571df8c
line wrap: on
line diff
--- a/web/log.py	Wed Jun 13 23:41:05 2012 +0800
+++ b/web/log.py	Thu Jun 14 00:00:57 2012 +0800
@@ -71,7 +71,10 @@
         zip((first_real_time + time_step*t for t in xrange(len(measurements))),
             measurements)]
 
-    rrdtool.update(sensor_rrd_path(sensor_id), *values)
+    rrdfile = sensor_rrd_path(sensor_id)
+    rrdtool.update(rrdfile, *values)
+    f = file(rrdfile)
+    os.fsync(f.fileno())
 
 def parse(lines):
     entries = dict(l.split('=', 1) for l in lines)