diff py/fridge.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 3f187baa3439
children 251524081924
line wrap: on
line diff
--- a/py/fridge.py	Fri Dec 19 21:39:18 2014 +0800
+++ b/py/fridge.py	Fri Dec 19 21:52:50 2014 +0800
@@ -52,7 +52,7 @@
             L("Fridge is disabled")
         while True:
             self.do()
-            gevent.sleep(config.FRIDGE_SLEEP)
+            self.server.sleep(config.FRIDGE_SLEEP)
 
     def do(self):
         """ this is the main fridge control logic """