u.r.RedisPushMultiClient(object) : class documentation

Part of udplog.redis View Source View In Hierarchy

Redis push client for round-robin dispatch to multiple clients.

This takes a list of client factories that are selected at random to dispatch each single push. If a client is not (yet) connected, the factory is taken out of the list of candidates, and re-added when the a new connection has been made.

Line # Kind Name Docs
77 Method __init__ Initialize.
102 Method lpush Add string to head of list.
87 Method _reconnected Called when a new connection for this factory has been made.
94 Method _disconnected Called when the connection for this factory is gone.
def __init__(self, factories): (source)

Initialize.

ParametersfactoriesClient factories. (type: list of RedisClientFactory.)
def _reconnected(self, factory): (source)

Called when a new connection for this factory has been made.

def _disconnected(self, factory): (source)

Called when the connection for this factory is gone.

def lpush(self, key, *values, **kwargs): (source)

Add string to head of list.

This selects a factory and attempts a push there, falling back to others until none are left. In that case, NoClientError is fired from the returned deferred.

ParameterskeyList key
valuesSequence of values to push
valueFor backwards compatibility, a single value.
API Documentation for udplog, generated by pydoctor at 2014-02-17 15:26:29.