diff py/params.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 78255c49bf9a
children d9e81a563923
line wrap: on
line diff
--- a/py/params.py	Fri Dec 19 21:39:18 2014 +0800
+++ b/py/params.py	Fri Dec 19 21:52:50 2014 +0800
@@ -26,7 +26,6 @@
 
     def __init__(self):
         self.update(_FIELD_DEFAULTS)
-        gevent.signal(signal.SIGHUP, self.reload_signal)
 
     def __getattr__(self, k):
         return self[k]
@@ -70,10 +69,3 @@
         s = StringIO.StringIO()
         self.save(s)
         return s.getvalue()
-
-    def reload_signal(self):
-        try:
-            self.load()
-            L("Reloaded.")
-        except self.Error, e:
-            W("Problem reloading: %s" % str(e))