diff options
author | Itamar Haber <itamar@redislabs.com> | 2018-10-15 20:37:55 +0300 |
---|---|---|
committer | Roey Prat <roey.prat@redislabs.com> | 2018-10-28 12:12:53 +0200 |
commit | 1f8c69cfcd6c0fad819fc78777b56873ec8d26dc (patch) | |
tree | 3c32b515a6ea399b5b136940c7c28a55ec68aa50 /redis/client.py | |
parent | f1ece6b139d7cf4a7900526ff1d53b1387d89c68 (diff) | |
download | redis-py-1f8c69cfcd6c0fad819fc78777b56873ec8d26dc.tar.gz |
Implements XACK
Diffstat (limited to 'redis/client.py')
-rwxr-xr-x | redis/client.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/redis/client.py b/redis/client.py index f3492da..410cdac 100755 --- a/redis/client.py +++ b/redis/client.py @@ -426,12 +426,13 @@ class StrictRedis(object): 'XGROUP DESTROY': int, 'XGROUP SETID': bool_ok, 'XGROUP DELCONSUMER': int - }, + }, { 'XINFO STREAM': parse_xinfo_dict, 'XINFO CONSUMERS': parse_xinfo_list, 'XINFO GROUPS': parse_xinfo_list }, + string_keys_to_dict('XACK', int), string_keys_to_dict( 'INCRBYFLOAT HINCRBYFLOAT GEODIST', float @@ -1952,6 +1953,15 @@ class StrictRedis(object): """ return self.execute_command('XINFO GROUPS', name) + def xack(self, name, groupname, *ids): + """ + Acknowledges the successful processing of one or more messages. + name: name of the stream. + groupname: name of the consumer group. + *ids: message ids to acknowlege. + """ + return self.execute_command('XACK', name, groupname, *ids) + # SORTED SET COMMANDS def zadd(self, name, *args, **kwargs): """ |