You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for wanting to report an issue you've found in redis-py. Please delete this text and fill in the template below.
It is of course not always possible to reduce your code to a small test case, but it's highly appreciated to have as much data as possible. Thank you!
Version: What redis-py and what redis version is the issue happening on?
redis-py version: 4.5.3 (and 4.5.1 before I upgrade version that try to solve the problem)
redis version: Redis server v=7.0.8 sha=00000000:0 malloc=jemalloc-5.2.1 bits=64 build=12b7d21b977d6ccd
Platform: What platform / version? (For example Python 3.5.1 on Windows 7 / Ubuntu 15.10 / Azure)
Platform: Python 3.8.10 on Ubuntu 20.04-05 TLS
Description: Description of your issue, stack traces from errors and code that reproduces the issue
As Redis doc mentioned, 'slowlog get' command will return 6 values for each item:
Each entry from the slow log is comprised of the following six values:
1. A unique progressive identifier for every slow log entry.
2. The unix timestamp at which the logged command was processed.
3. The amount of time needed for its execution, in microseconds.
4. The array composing the arguments of the command.
5. Client IP address and port.
6. Client name if set via the [CLIENT SETNAME](https://redis.io/commands/client-setname) command.
Doc URL: https://redis.io/commands/slowlog-get/
I have try both execute_command() and slowlog_get() to get result, but no luck.
My code snippet:
def get_slowlog(self, num=None):
redis_command='SLOWLOG GET'
try:
# result = self.r.execute_command(redis_command)
if num:
result = self.r.slowlog_get(num=num)
else:
result = self.r.slowlog_get()
Thanks for wanting to report an issue you've found in redis-py. Please delete this text and fill in the template below.
It is of course not always possible to reduce your code to a small test case, but it's highly appreciated to have as much data as possible. Thank you!
Version: What redis-py and what redis version is the issue happening on?
Platform: What platform / version? (For example Python 3.5.1 on Windows 7 / Ubuntu 15.10 / Azure)
Description: Description of your issue, stack traces from errors and code that reproduces the issue
As Redis doc mentioned, 'slowlog get' command will return 6 values for each item:
Here is my redis-cli output sample:
And this is redis-py output sample:
I have try both execute_command() and slowlog_get() to get result, but no luck.
My code snippet:
Remark: where 'r' in the code is Redis client:
The text was updated successfully, but these errors were encountered: