summaryrefslogtreecommitdiff
path: root/redis/commands.py
diff options
context:
space:
mode:
authorAgustin Marquez <agusdmb@gmail.com>2021-10-25 08:28:50 +0200
committerGitHub <noreply@github.com>2021-10-25 09:28:50 +0300
commit36e00ec4e22a9f947e099affdfdc79862ac7ca08 (patch)
tree033f6af87bc7726b5d431015ea8b6c05c2053ec7 /redis/commands.py
parentcf5c5865bb9947498f3810b028628f3d2ab14030 (diff)
downloadredis-py-36e00ec4e22a9f947e099affdfdc79862ac7ca08.tar.gz
Add FULL option to XINFO SUMMARY (#1638)
Diffstat (limited to 'redis/commands.py')
-rw-r--r--redis/commands.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/redis/commands.py b/redis/commands.py
index f2c1538..f5243e4 100644
--- a/redis/commands.py
+++ b/redis/commands.py
@@ -2050,12 +2050,18 @@ class Commands:
"""
return self.execute_command('XINFO GROUPS', name)
- def xinfo_stream(self, name):
+ def xinfo_stream(self, name, full=False):
"""
Returns general information about the stream.
name: name of the stream.
+ full: optional boolean, false by default. Return full summary
"""
- return self.execute_command('XINFO STREAM', name)
+ pieces = [name]
+ options = {}
+ if full:
+ pieces.append(b'FULL')
+ options = {'full': full}
+ return self.execute_command('XINFO STREAM', *pieces, **options)
def xlen(self, name):
"""