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. |
Initialize.
| Parameters | factories | Client factories. (type: list of RedisClientFactory.) |
Called when a new connection for this factory has been made.
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.
| Parameters | key | List key |
| values | Sequence of values to push | |
| value | For backwards compatibility, a single value. |