constants: add confd reload and rate limit times
authorGuido Trotter <ultrotter@google.com>
Sun, 23 Aug 2009 17:07:42 +0000 (20:07 +0300)
committerGuido Trotter <ultrotter@google.com>
Fri, 28 Aug 2009 11:08:07 +0000 (14:08 +0300)
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

lib/constants.py

index 4c97ab2..5384765 100644 (file)
@@ -670,3 +670,12 @@ CONFD_ERROR_INTERNAL = 2
 # This constants decides how many seconds of skew to accept.
 # TODO: make this a default and allow the value to be more configurable
 CONFD_MAX_CLOCK_SKEW = 300
+
+# When we haven't reloaded the config for more than this amount of seconds, we
+# force a test to see if inotify is betraying us.
+CONFD_CONFIG_RELOAD_TIMEOUT = 60
+
+# If we receive more than one update in this amount of seconds, we move to
+# polling every RATELIMIT seconds, rather than relying on inotify, to be able
+# to serve more requests.
+CONFD_CONFIG_RELOAD_RATELIMIT = 2