Skip to content

Commit ee51d2d

Browse files
authored
Do not use script load by default for envoy compat (#23)
1 parent c9717b5 commit ee51d2d

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

redis/commands/core.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5021,9 +5021,7 @@ def __call__(
50215021
except NoScriptError:
50225022
# Maybe the client is pointed to a different server than the client
50235023
# that created this instance?
5024-
# Overwrite the sha just in case there was a discrepancy.
5025-
self.sha = client.script_load(self.script)
5026-
return client.evalsha(self.sha, len(keys), *args)
5024+
return client.eval(self.script, len(keys), *args)
50275025

50285026

50295027
class AsyncScript:
@@ -5821,9 +5819,7 @@ def __call__(self, keys=[], args=[], client=None):
58215819
except NoScriptError:
58225820
# Maybe the client is pointed to a different server than the client
58235821
# that created this instance?
5824-
# Overwrite the sha just in case there was a discrepancy.
5825-
self.sha = client.script_load(self.script)
5826-
return client.evalsha(self.sha, len(keys), *args)
5822+
return client.eval(self.script, len(keys), *args)
58275823

58285824
def get_encoder(self):
58295825
"""Get the encoder to encode string scripts into bytes."""

0 commit comments

Comments
 (0)