diff --git a/gnocchi/common/redis.py b/gnocchi/common/redis.py index c0bf6e82b..2973bab8e 100644 --- a/gnocchi/common/redis.py +++ b/gnocchi/common/redis.py @@ -65,6 +65,10 @@ 'db', 'health_check_interval', 'socket_keepalive', +]) + +#: Client arguments that are expected to be float convertible. +CLIENT_FLOAT_ARGS = frozenset([ 'socket_timeout', ]) @@ -137,6 +141,8 @@ def get_client(conf, scripts=None): v = options[a] elif a in CLIENT_INT_ARGS: v = int(options[a][-1]) + elif a in CLIENT_FLOAT_ARGS: + v = float(options[a][-1]) else: v = options[a][-1] kwargs[a] = v