Pipeline Support¶
coredis.pipeline
Pipelining and Transactions are exposed by the following classes
that are returned by coredis.Redis.pipeline()
and coredis.RedisCluster.pipeline()
.
For examples refer to Pipelines.
- class Pipeline[source]¶
Class returned by
coredis.Redis.pipeline()
The class exposes the redis command methods available in
Redis
, however each of those methods returns the instance itself and the results of the batched commands can be retrieved by callingexecute()
.- multi() None [source]¶
Starts a transactional block of the pipeline after WATCH commands are issued. End the transactional block with
execute()
- class ClusterPipeline[source]¶
Class returned by
coredis.RedisCluster.pipeline()
The class exposes the redis command methods available in
Redis
, however each of those methods returns the instance itself and the results of the batched commands can be retrieved by callingexecute()
.- multi() None [source]¶
Starts a transactional block of the pipeline after WATCH commands are issued. End the transactional block with
execute()
- async watch(*keys: KeyT) bool [source]¶
Watches the values at keys
keys
- Raises:
ClusterTransactionError
if a watch is issued on a key that resides on a different cluster node than a previous watch.