From 8368ee597efde22a34a13679c409476c87eef893 Mon Sep 17 00:00:00 2001 From: Gal Ben David Date: Sun, 3 Oct 2021 15:27:55 +0300 Subject: [PATCH] stop using redis single connection as it is not thread safe --- .pre-commit-config.yaml | 6 +++--- requirements.txt | 2 +- sergeant/connector/redis.py | 2 +- setup.py | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e11e593..6cb8821 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,14 +1,14 @@ exclude: '.*(test|benchmark).*' repos: - repo: https://github.com/Intsights/flake8-intsights - rev: v0.1.5 + rev: v0.1.6 hooks: - id: flake8-intsights - repo: https://github.com/PyCQA/isort - rev: 5.7.0 + rev: 5.9.3 hooks: - id: isort - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.812 + rev: v0.910 hooks: - id: mypy diff --git a/requirements.txt b/requirements.txt index 293c86e..bcb74f0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -hiredis==1.* +hiredis==2.* msgpack==1.* orjson==3.* psutil==5.* diff --git a/sergeant/connector/redis.py b/sergeant/connector/redis.py index ae69a7e..7ae159c 100644 --- a/sergeant/connector/redis.py +++ b/sergeant/connector/redis.py @@ -228,7 +228,7 @@ def __init__( socket_keepalive=True, socket_connect_timeout=10, socket_timeout=60, - single_connection_client=True, + single_connection_client=False, ) for node in nodes ] diff --git a/setup.py b/setup.py index c5bf300..c913ea9 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setuptools.setup( name='sergeant', - version='0.21.1', + version='0.22.0', author='Gal Ben David', author_email='gal@intsights.com', url='https://github.com/Intsights/sergeant', @@ -24,7 +24,7 @@ python_requires='>=3.7', zip_safe=False, install_requires=[ - 'hiredis==1.*', + 'hiredis==2.*', 'msgpack==1.*', 'orjson==3.*', 'psutil==5.*',