Mercurial > templog
diff py/sensor_ds18b20.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 | 77c2a9caca3d |
children | d9e81a563923 |
line wrap: on
line diff
--- a/py/sensor_ds18b20.py Fri Dec 19 21:39:18 2014 +0800 +++ b/py/sensor_ds18b20.py Fri Dec 19 21:52:50 2014 +0800 @@ -35,7 +35,7 @@ def _run(self): while True: self.do() - gevent.sleep(config.SENSOR_SLEEP) + self.server.sleep(config.SENSOR_SLEEP) def read_wait(self, f): # handles a blocking file read with a gevent threadpool. A