-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
The reference RedisDataStore here appears to be broken:
python-sdk/statsig/redis_data_store.py
Lines 11 to 27 in bc1e321
| class RedisDataStore(IDataStore): | |
| _connection: redis.Redis | |
| def __init__(self, host: str, port: int, password: str): | |
| if not has_imported_redis: | |
| raise ImportError("Failed to import redis, have you installed the redis dependency?") | |
| self._connection = redis.Redis(host=host, port=port, password=password) | |
| def get(self, key: str) -> str | None: | |
| return self._connection.get(key) | |
| def set(self, key: str, value: str): | |
| self._connection.set(key, value) | |
| def shutdown(self): | |
| self._connection.shutdown() |
Redis.get returns bytes, not a string. Setting decode_responses to True when constructing the client appears to be one way to resolve the problem.
Metadata
Metadata
Assignees
Labels
No labels