summaryrefslogtreecommitdiff
path: root/redis/client.py
diff options
context:
space:
mode:
authorChayim <chayim@users.noreply.github.com>2021-09-01 17:09:41 +0300
committerGitHub <noreply@github.com>2021-09-01 17:09:41 +0300
commitfebede19423c95515a7548cd73aa1a90c639ba1f (patch)
tree969d634fc1416bab3e08d38c7dddf74597e793fc /redis/client.py
parentb6ecd0d6b7e6848dd085c3644ed31598fb1c9f83 (diff)
downloadredis-py-febede19423c95515a7548cd73aa1a90c639ba1f.tar.gz
Pipeline DISCARD support (#1565)
closes #1539 Part of #1546
Diffstat (limited to 'redis/client.py')
-rwxr-xr-xredis/client.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/redis/client.py b/redis/client.py
index 8979280..7a022a0 100755
--- a/redis/client.py
+++ b/redis/client.py
@@ -1810,6 +1810,12 @@ class Pipeline(Redis):
finally:
self.reset()
+ def discard(self):
+ """Flushes all previously queued commands
+ See: https://redis.io/commands/DISCARD
+ """
+ self.execute_command("DISCARD")
+
def watch(self, *names):
"Watches the values at keys ``names``"
if self.explicit_transaction: