Commit 7fd177d8 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Use Redis class instead of deprecated StrictRedis. Clarify name discrepancy of...


Use Redis class instead of deprecated StrictRedis. Clarify name discrepancy of redis between PyPI and conda-forge.
Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent 4c1fd144
......@@ -27,7 +27,7 @@
__author__ = 'Daniel Scheffler'
import time
from redis import StrictRedis
from redis import Redis
from redis_semaphore import Semaphore
from redis.exceptions import ConnectionError as RedisConnectionError
from retools.lock import Lock, LockTimeout
......@@ -38,7 +38,7 @@ from ..misc.logging import GMS_logger
from ..options.config import GMS_config as CFG
try:
redis_conn = StrictRedis(host='localhost', db=0)
redis_conn = Redis(host='localhost', db=0)
redis_conn.keys() # may raise ConnectionError, e.g., if redis server is not installed or not running
except RedisConnectionError:
redis_conn = None
......@@ -48,8 +48,8 @@ except RedisConnectionError:
To get a list of all currently set redis keys, run:
from redis import StrictRedis
conn = StrictRedis('localhost', db=0)
from redis import Redis
conn = Redis('localhost', db=0)
list(sorted(conn.keys()))
Then, to delete all currently set redis keys, run:
......
......@@ -64,7 +64,7 @@ req = [
'pyrsr>=0.3.1',
'py_tools_ds>=0.12.4',
'pytz',
'redis',
'redis', # named redis on PyPI and redis-py on conda-forge
'redis-semaphore',
'retools',
'scikit-learn',
......
......@@ -42,7 +42,7 @@ dependencies:
- pyinstrument
- pyorbital
- pytz
- redis
- redis # named redis on PyPI and redis-py on conda-forge
- retools
- redis-semaphore
- spectral
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment