diff options
author | Itamar Haber <itamar@redislabs.com> | 2018-10-15 20:52:33 +0300 |
---|---|---|
committer | Roey Prat <roey.prat@redislabs.com> | 2018-10-28 12:12:54 +0200 |
commit | 2a15e07f1a8aec26d287ec31ed330f598a1fca00 (patch) | |
tree | b518d527854f3d70123552f2901897d7a8882131 /redis/client.py | |
parent | 1f8c69cfcd6c0fad819fc78777b56873ec8d26dc (diff) | |
download | redis-py-2a15e07f1a8aec26d287ec31ed330f598a1fca00.tar.gz |
Implements XDEL
Diffstat (limited to 'redis/client.py')
-rwxr-xr-x | redis/client.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/redis/client.py b/redis/client.py index 410cdac..45b9879 100755 --- a/redis/client.py +++ b/redis/client.py @@ -432,7 +432,10 @@ class StrictRedis(object): 'XINFO CONSUMERS': parse_xinfo_list, 'XINFO GROUPS': parse_xinfo_list }, - string_keys_to_dict('XACK', int), + string_keys_to_dict( + 'XACK XDEL', + int + ), string_keys_to_dict( 'INCRBYFLOAT HINCRBYFLOAT GEODIST', float @@ -1962,6 +1965,14 @@ class StrictRedis(object): """ return self.execute_command('XACK', name, groupname, *ids) + def xdel(self, name, *ids): + """ + Deletes one or more messages from a stream. + name: name of the stream. + *ids: message ids to delete. + """ + return self.execute_command('XDEL', name, *ids) + # SORTED SET COMMANDS def zadd(self, name, *args, **kwargs): """ |