Skip to content

Commit 3d4740a

Browse files
committed
support for client unpause (redis#1512)
1 parent 5b7fd7c commit 3d4740a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

redis/client.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,6 +1300,12 @@ def client_pause(self, timeout):
13001300
raise DataError("CLIENT PAUSE timeout must be an integer")
13011301
return self.execute_command('CLIENT PAUSE', str(timeout))
13021302

1303+
def client_unpause(self):
1304+
"""
1305+
Unpause all redis clients
1306+
"""
1307+
return self.execute_command('CLIENT UNPAUSE')
1308+
13031309
def readwrite(self):
13041310
"Disables read queries for a connection to a Redis Cluster slave node"
13051311
return self.execute_command('READWRITE')

tests/test_commands.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,10 @@ def test_client_pause(self, r):
402402
with pytest.raises(exceptions.RedisError):
403403
r.client_pause(timeout='not an integer')
404404

405+
@skip_if_server_version_lt('6.2.0')
406+
def test_client_unpause(self, r):
407+
assert r.client_unpause() == b'OK'
408+
405409
def test_config_get(self, r):
406410
data = r.config_get()
407411
assert 'maxmemory' in data

0 commit comments

Comments
 (0)