marcelometal / redis

Redis support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Redis storage adapters

Circle CI

Thumbor redis storage adapters.

Installation

pip install tc_redis

Configuration

To use redis as a storage or result storage some values must be configured in thumbor.conf

Redis Storage
Single Node
STORAGE = "tc_redis.storages.redis_storage"

REDIS_STORAGE_IGNORE_ERRORS = True
REDIS_STORAGE_SERVER_PORT = 6379
REDIS_STORAGE_SERVER_HOST = "localhost"
REDIS_STORAGE_SERVER_DB = 0
REDIS_STORAGE_SERVER_PASSWORD = None
REDIS_STORAGE_MODE = "single_node"
Sentinel
STORAGE = "tc_redis.storages.redis_storage"

REDIS_STORAGE_IGNORE_ERRORS = True
REDIS_SENTINEL_STORAGE_INSTANCES = "localhost:26379,localhost:26380"
REDIS_SENTINEL_STORAGE_MASTER_INSTANCE = "redismaster"
REDIS_SENTINEL_STORAGE_MASTER_PASSWORD = "dummy"
REDIS_SENTINEL_STORAGE_PASSWORD = "dummy"
REDIS_SENTINEL_STORAGE_SOCKET_TIMEOUT = 1.0
REDIS_STORAGE_MODE = "sentinel"
Redis Result Storage
Single Node
RESULT_STORAGE = "tc_redis.result_storages.redis_result_storage"

REDIS_RESULT_STORAGE_IGNORE_ERRORS = True
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_MODE = "single_node"
Sentinel
RESULT_STORAGE = "tc_redis.result_storages.redis_result_storage"

REDIS_RESULT_STORAGE_IGNORE_ERRORS = True
REDIS_SENTINEL_RESULT_STORAGE_INSTANCES = "localhost:26379,localhost:26380"
REDIS_SENTINEL_RESULT_STORAGE_MASTER_INSTANCE = "redismaster"
REDIS_SENTINEL_RESULT_STORAGE_MASTER_PASSWORD = "dummy"
REDIS_SENTINEL_RESULT_STORAGE_PASSWORD = "dummy"
REDIS_SENTINEL_RESULT_STORAGE_SOCKET_TIMEOUT = 1.0
REDIS_RESULT_STORAGE_MODE = "sentinel"

Contribute

To build tc_redis locally use

make setup

To run unit tests use

make test

About

Redis support

License:MIT License


Languages

Language:Python 99.4%Language:Makefile 0.6%