celery_redis_sentinel.transport module¶
-
class
celery_redis_sentinel.transport.
SentinelChannel
(*args, **kwargs)[source]¶ Bases:
kombu.transport.redis.Channel
Redis Channel for interacting with Redis Sentinel
Note
In order to correctly configure the sentinel, this channel expects specific broker transport options to be provided via
BROKER_TRANSPORT_OPTIONS
. Here is are sample transport options:BROKER_TRANSPORT_OPTIONS = { 'sentinels': [('192.168.1.1', 26379), ('192.168.1.2', 26379), ('192.168.1.3', 26379)], 'service_name': 'master', 'socket_timeout': 0.1, }
-
from_transport_options
= (u'body_encoding', u'deadletter_queue', u'ack_emulation', u'unacked_key', u'unacked_index_key', u'unacked_mutex_key', u'unacked_mutex_expire', u'visibility_timeout', u'unacked_restore_limit', u'fanout_prefix', u'fanout_patterns', u'socket_timeout', u'socket_connect_timeout', u'socket_keepalive', u'socket_keepalive_options', u'queue_order_strategy', u'max_connections', u'priority_steps', u'sentinels', u'service_name', u'socket_timeout')¶
-
sentinel_pool
[source]¶ Cached property for getting connection pool to redis sentinel.
In addition to returning connection pool, this property changes the
Transport
connection details to match the connected master so that celery can correctly log to which node it is actually connected.Returns: Connection pool instance connected to redis sentinel Return type: CelerySentinelConnectionPool
-
-
class
celery_redis_sentinel.transport.
SentinelTransport
(*args, **kwargs)[source]¶ Bases:
kombu.transport.redis.Transport
Redis transport with support for Redis Sentinel.
-
Channel
¶ alias of
SentinelChannel
-