slapos/recipe/redis/promise: Don't create connection pool explicitly
Because redis.Redis(...) ctor creates connection pool on initialization and we can rely on it. Another reason: Redis ctor (in form of StrictRedis.__init__()) has logic how to process arguments and does selecting - either it is TCP (`host` and `port` args), or UNIX socket (`unix_socket_path` arg): https://lab.nexedi.com/nexedi/slapos/blob/95dbb5b2/slapos/recipe/redis/MyRedis2410.py#L560 Since we are going to introduce unix socket support to redis recipe in the next patch, and don't want to duplicate StrictRedis.__init__() logic in promise code, let's refactor promise to delegate argument processing logic to Redis. /reviewed-by @kazuhiko (on !27) /cc @alain.takoudjou
Showing
Please register or sign in to comment