From 84c3ab289c2ec83ec0e1203c7fc9c8dee531cfd2 Mon Sep 17 00:00:00 2001 From: Guido Trotter <ultrotter@google.com> Date: Sun, 23 Aug 2009 20:07:42 +0300 Subject: [PATCH] constants: add confd reload and rate limit times Signed-off-by: Guido Trotter <ultrotter@google.com> Reviewed-by: Michael Hanselmann <hansmi@google.com> --- lib/constants.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/constants.py b/lib/constants.py index 4c97ab21d..538476596 100644 --- a/lib/constants.py +++ b/lib/constants.py @@ -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 -- GitLab