| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Fixed #1220
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `Redis` class and the `ConnectionPool` class now support the
"health_check_interval=N" option. By default N=0, which turns off health
checks. `N` should be an integer, and when greater than 0, ensures that
a health check is performed just before command execution anytime the
underlying connection has been idle for more than N seconds. A health
check is a full PING/PONG round trip to the Redis server.
If a health check encounters a ConnectionError or TimeoutError, the connection
is disconnected and reconnected and the health check is retried exactly once.
Any error during the retry is raised to the caller. Health check retries
are not governed by any other options such as `retry_on_timeout`. In systems
where idle times are common, these health checks are the intended way to
reconnect to the Redis server without harming any user data.
When this option is enabled for PubSub connections, calling `get_message()` or
`listen()` will send a health check anytime a message has not been read on
the PubSub connection for `health_check_interval` seconds. Users should
call `get_message()` or `listen()` at least every `health_check_interval`
seconds in order to keep the connection open.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This has multiple uses:
* Single connection clients will not be considered threadsafe. This means
certain settings could temporarily be adjusted. For example, a context
manager could temporarily modify the encoding behavior for a set
of commands.
* We can introduce more thorough health checks that only happen when a
connection is handed out from the connection pool.
* Workloads that issue many commands to Redis should be slightly faster.
Prior to this change, the client must retrieve a connection from the
pool for each command.
|
|
|
|
| |
Fixes #1191
|
| |
|
|
|
|
|
|
|
| |
this change allows users to call client.execute_command('info') or
client.execute_command('INFO') and get the same parsed result.
Fixes #1168
|
|\
| |
| | |
Skip 64-bit specific tests. (Closes: #899)
|
| |
| |
| |
| | |
Signed-off-by: Chris Lamb <lamby@debian.org>
|
| | |
|
| | |
|
|\ \ |
|
| | | |
|
|/ /
| |
| |
| |
| |
| | |
messages
Signed-off-by: Xabier Eizmendi <xeizmendi@gmail.com>
|
| |
| |
| |
| | |
Stream message now respect the decode_responses flag.
|
| |
| |
| |
| |
| |
| |
| | |
Redis versions 5.0.1 require messages to be read with the special ID '>'
when using XREADGROUP
Fixes #1073
|
| |
| |
| |
| |
| |
| |
| | |
When incr=True and xx=True and an element is specified that doesn't exist
the Redis server returns None. redis-py now does this as well.
Fixes #1084
|
| |
| |
| |
| | |
Signed-off-by: Theo Despoudis <thdespou@hotmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Theo Despoudis <thdespou@hotmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Theo Despoudis <thdespou@hotmail.com>
|
| | |
|
|/ |
|
| |
|
|\
| |
| | |
Fixes a KeyError in empty `options` dict at sort's return
|
| |
| |
| |
| | |
Fixes #924
|
| |
| |
| |
| | |
Fixes #939
|
| |
| |
| |
| |
| |
| | |
Fixes #1053
Fixes #635
Fixes #766
|
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes #649
Fixes #954
Fixes #638
Fixes #721
Fixes #955
|
| |
| |
| |
| | |
fixes #571
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
redis-py maintained backwards compatibility by keeping the old "Redis"
class around for quite some time. While no doubt a convenience for folks
who relied on it, the presence of both Redis and StrictRedis causes
a number of support issues and general confusion. With 3.0, we're
breaking a few things to make redis-py better going forward.
This change removes the old Redis class. We also renamed the StrictRedis
class to Redis and aliased StrictRedis to Redis. For people that have
been using StrictRedis, this should not change anything. You can continue
doing things as you are.
People still using the legacy Redis class will need to update the argument
order for the SETEX, LREM and ZADD commands. Additionally, the return values
for TTL and PTTL now return the integer values -1 when a key exists but
has no expire time and -2 when a key does not exist. Previously these
cases returned a None value in the Redis class.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously MSET, MSETNX and ZADD accepted multiple ways to specify the
mapping of keys to values including via **kwargs. This turned out to be
a poor choice. As Redis evolved and added additional options to the ZADD
command, these options couldn't be specified in redis-py without possible
element name conflictd. This fixes that going forward and makes the commands
simpler.
|
|\ \
| | |
| | | |
CLIENT PAUSE and type argument in client_list
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Signed-off-by: Itamar Haber <itamar@redislabs.com>
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- bitfields now accept a `default_overflow` argument that sets the
default overflow behavior for incrby operations
- exposed an overflow() method that sets the overflow behavior for future
incrby operations. this can be used in place of the overfly argument
to incrby if someone prefers
- clean up bitfield instance upon execution, resetting the overflow behavior
back to the default provided and clearing the list of operations
|
|/ / |
|
|\ \ |
|
| | |
| | |
| | |
| | | |
Remove workaround for handling unicode with older Pythons.
|
| | | |
|
| | |
| | |
| | |
| | | |
All supported Python versions support the with statement.
|
|\ \ \
| | | |
| | | | |
Add support for UNLINK command
|
| | |/
| |/| |
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | | |
allow commands that expect 1 or more keys to fail gracefully when 0 keys are provided
|
| | | |
|
| | | |
|
| |\ \
| | | |
| | | | |
Adds support for ZPOPMAX, ZPOPMIN and their respective blocking variants
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Itamar Haber <itamar@redislabs.com>
|