diff --git a/README.md b/README.md index 094e4dd..7b9e672 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ Thumbor redis storage adapters. To use redis as a storage or result storage some values must be configured in `thumbor.conf` ##### Redis Storage + ``` STORAGE='tc_redis.storages.redis_storage' @@ -21,6 +22,9 @@ REDIS_STORAGE_SERVER_PORT = 6379 REDIS_STORAGE_SERVER_HOST = 'localhost' REDIS_STORAGE_SERVER_DB = 0 REDIS_STORAGE_SERVER_PASSWORD = None +REDIS_STORAGE_SERVER_SSL_ENABLED = False +REDIS_STORAGE_SERVER_SSL_CERTS = '/path/to/certs' +REDIS_STORAGE_SERVER_SSL_CHECK_DISABLED = False ``` ##### Redis Result Storage @@ -33,4 +37,7 @@ REDIS_RESULT_STORAGE_SERVER_PORT = 6379 REDIS_RESULT_STORAGE_SERVER_HOST = 'localhost' REDIS_RESULT_STORAGE_SERVER_DB = 0 REDIS_RESULT_STORAGE_SERVER_PASSWORD = None +REDIS_RESULT_STORAGE_SERVER_SSL_ENABLED = False +REDIS_RESULT_STORAGE_SERVER_SSL_CERTS = '/path/to/certs' +REDIS_RESULT_STORAGE_SERVER_SSL_CHECK_DISABLED = False ``` diff --git a/requirements.txt b/requirements.txt index e5d10a4..29c6e25 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -redis +redis>=3.5 thumbor>=5.0.0 diff --git a/setup.py b/setup.py index e63d0e9..ac8fe1c 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ def read(fname): setup( name="tc_redis", - version="1.0.1", + version="1.1.0", author="Thumbor Community", description=("Thumbor redis storage adapters"), license="MIT", @@ -29,6 +29,6 @@ def read(fname): ], install_requires=[ 'thumbor>=5.0.0', - 'redis' + 'redis>=3.5' ] ) diff --git a/tc_redis/result_storages/redis_result_storage.py b/tc_redis/result_storages/redis_result_storage.py index a4e6792..663e6dc 100644 --- a/tc_redis/result_storages/redis_result_storage.py +++ b/tc_redis/result_storages/redis_result_storage.py @@ -62,7 +62,10 @@ def reconnect_redis(self): port=self.context.config.REDIS_RESULT_STORAGE_SERVER_PORT, host=self.context.config.REDIS_RESULT_STORAGE_SERVER_HOST, db=self.context.config.REDIS_RESULT_STORAGE_SERVER_DB, - password=self.context.config.REDIS_RESULT_STORAGE_SERVER_PASSWORD + password=self.context.config.REDIS_RESULT_STORAGE_SERVER_PASSWORD, + ssl=self.context.config.REDIS_RESULT_STORAGE_SERVER_SSL_ENABLED + ssl_ca_certs=self.context.config.REDIS_RESULT_STORAGE_SERVER_SSL_CERTS + ssl_cert_reqs=self.context.config.REDIS_RESULT_STORAGE_SERVER_SSL_CHECK_DISABLED ) if self.shared_client: diff --git a/tc_redis/storages/redis_storage.py b/tc_redis/storages/redis_storage.py index 9c4fc1a..29c6694 100644 --- a/tc_redis/storages/redis_storage.py +++ b/tc_redis/storages/redis_storage.py @@ -45,7 +45,10 @@ def reconnect_redis(self): port=self.context.config.REDIS_STORAGE_SERVER_PORT, host=self.context.config.REDIS_STORAGE_SERVER_HOST, db=self.context.config.REDIS_STORAGE_SERVER_DB, - password=self.context.config.REDIS_STORAGE_SERVER_PASSWORD + password=self.context.config.REDIS_STORAGE_SERVER_PASSWORD, + ssl=self.context.config.REDIS_STORAGE_SERVER_SSL_ENABLED + ssl_ca_certs=self.context.config.REDIS_STORAGE_SERVER_SSL_CERTS + ssl_cert_reqs=self.context.config.REDIS_STORAGE_SERVER_SSL_CHECK_DISABLED ) if self.shared_client: