Skip to content

Commit 5fce896

Browse files
Merge pull request #393 from yashsinghcodes/new
append actual value in set_cache
2 parents 913a04a + 91e6177 commit 5fce896

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

shuffle-tools/1.2.0/run.sh

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Build testing
2-
NAME=frikky/shuffle:shuffle-tools_1.1.0
2+
NAME=frikky/shuffle:shuffle-tools_1.2.0
33
docker rmi $NAME --force
4-
docker build . -t frikky/shuffle:shuffle-tools_1.1.0
4+
docker build . -t frikky/shuffle:shuffle-tools_1.2.0
55

66
# Run testing
77
#docker run -e SHUFFLE_SWARM_CONFIG=run -e SHUFFLE_APP_EXPOSED_PORT=33334 frikky/shuffle:shuffle-tools_1.1.0

shuffle-tools/1.2.0/src/app.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1981,7 +1981,14 @@ def check_cache_contains(self, key, value, append):
19811981
allvalues["value"].append(value)
19821982
exception = ""
19831983
try:
1984+
# FIXME: This is a hack, but it works
19841985
if directcall:
1986+
new_value = parsedvalue
1987+
if new_value == None:
1988+
new_value = [value]
1989+
1990+
data["value"] = json.dumps(new_value)
1991+
19851992
set_url = "%s/api/v1/orgs/%s/set_cache" % (self.url, org_id)
19861993
response = requests.post(set_url, json=data, verify=False)
19871994
allvalues = response.json()
@@ -1991,7 +1998,7 @@ def check_cache_contains(self, key, value, append):
19911998
return {
19921999
"success": True,
19932000
"found": False,
1994-
"reason": "Appended as it didn't exist",
2001+
"reason": f"Appended as it didn't exist",
19952002
"key": key,
19962003
"search": value,
19972004
"value": parsedvalue,

0 commit comments

Comments
 (0)