Skip to content

Commit

Permalink
Merge pull request #361 from jogo/360
Browse files Browse the repository at this point in the history
Support noreply for hash flush_all
  • Loading branch information
jogo authored Jan 21, 2022
2 parents 0711914 + b1e9199 commit c6582fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pymemcache/client/hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,9 +438,9 @@ def replace(self, key, *args, **kwargs):
def touch(self, key, *args, **kwargs):
return self._run_cmd("touch", key, False, *args, **kwargs)

def flush_all(self):
def flush_all(self, *args, **kwargs):
for client in self.clients.values():
self._safely_run_func(client, client.flush_all, False)
self._safely_run_func(client, client.flush_all, False, *args, **kwargs)

def quit(self):
for client in self.clients.values():
Expand Down
4 changes: 4 additions & 0 deletions pymemcache/test/test_client_hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,10 @@ def test_noreply_set_many(self):
result = client.set_many(values, noreply=True)
assert result == []

def test_noreply_flush(self):
client = self.make_client()
client.flush_all(noreply=True)

def test_set_many_unix(self):
values = {"key1": "value1", "key2": "value2", "key3": "value3"}

Expand Down

0 comments on commit c6582fd

Please sign in to comment.