diff py/uploader.py @ 219:16a83e2c97a0

sleep on a semaphore so it can start/stop immediately when there's a SIGHUP from the web UI. makes it seem more magical.
author Matt Johnston <matt@ucc.asn.au>
date Fri, 19 Dec 2014 21:52:50 +0800
parents 4d82099d1fe0
children d9e81a563923 28eb733cb803
line wrap: on
line diff
--- a/py/uploader.py	Fri Dec 19 21:39:18 2014 +0800
+++ b/py/uploader.py	Fri Dec 19 21:52:50 2014 +0800
@@ -23,7 +23,7 @@
         gevent.sleep(5)
         while True:
             self.do()
-            gevent.sleep(config.UPLOAD_SLEEP)
+            self.server.sleep(config.UPLOAD_SLEEP)
 
     def get_tosend(self, readings):
         tosend = {}