Pipelines provide a way to transmit multiple commands to the Redis
server in one transmission. This is convenient for batch processing,
such as saving all the values in a list to Redis.
All commands executed within a pipeline are wrapped with MULTI and
EXEC calls. This guarantees all commands executed in the pipeline will be
executed atomically.
Any command raising an exception does *not* halt the execution of
subsequent commands in the pipeline. Instead, the exception is caught and
its instance is placed into the response list returned by execute(). Code
iterating over the response list should be able to deal with an instance
of an exception as a potential value. In general, these will be
ResponseError exceptions, such as those raised when issuing a command on
a key of a different datatype.
|
__init__(self,
connection_pool,
response_callbacks,
transaction,
shard_hint)
x.__init__(...) initializes x; see help(type(x)) for signature |
source code
|
|
|
|
|
__exit__(self,
exc_type,
exc_value,
traceback) |
source code
|
|
|
|
|
|
|
multi(self)
Start a transactional block of the pipeline after WATCH commands are
issued. |
source code
|
|
|
|
|
|
|
|
|
parse_response(self,
connection,
command_name,
**options) |
source code
|
|
|
|
|
execute(self)
Execute all the commands in the current pipeline |
source code
|
|
|
watch(self,
*names)
Watches the values at keys ``names`` |
source code
|
|
|
unwatch(self)
Unwatches all previously specified keys |
source code
|
|
|
script_load_for_pipeline(self,
script)
Make sure scripts are loaded prior to pipeline execution |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|