Skip to content

Commit a3f2826

Browse files
committed
support for client unpause (redis#1512)
1 parent 98b7842 commit a3f2826

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
@@ -1305,6 +1305,12 @@ def client_pause(self, timeout):
13051305
raise DataError("CLIENT PAUSE timeout must be an integer")
13061306
return self.execute_command('CLIENT PAUSE', str(timeout))
13071307

1308+
def client_unpause(self):
1309+
"""
1310+
Unpause all redis clients
1311+
"""
1312+
return self.execute_command('CLIENT UNPAUSE')
1313+
13081314
def readwrite(self):
13091315
"Disables read queries for a connection to a Redis Cluster slave node"
13101316
return self.execute_command('READWRITE')

tests/test_commands.py

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

413+
@skip_if_server_version_lt('6.2.0')
414+
def test_client_unpause(self, r):
415+
assert r.client_unpause() == b'OK'
416+
413417
def test_config_get(self, r):
414418
data = r.config_get()
415419
assert 'maxmemory' in data

0 commit comments

Comments
 (0)