Skip to content

Commit 230c0da

Browse files
Merge pull request #394 from yashsinghcodes/new
removed gzip
2 parents 64d42b3 + de9ca71 commit 230c0da

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

shuffle-tools/1.2.0/src/app.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -720,16 +720,6 @@ def preload_cache(self, key):
720720
response_data["value"] = parsed
721721
return get_response.json()
722722

723-
def check_compression(self, obj, threshold=1_000_000):
724-
data_btyes = json.dumps(obj).encode("utf-8")
725-
if len(data_btyes) > threshold:
726-
return True
727-
return False
728-
729-
def compress_data(self, obj):
730-
data_btyes = json.dumps(obj).encode("utf-8")
731-
compressed_data = gzip.compress(data_btyes)
732-
return base64.b64encode(compressed_data).decode("utf-8")
733723

734724
def update_cache(self, key):
735725
org_id = self.full_execution["workflow"]["execution_org"]["id"]
@@ -1031,9 +1021,6 @@ def filter_list(self, input_list, field, check, value, opposite):
10311021
"valid": new_list,
10321022
"invalid": failed_list,
10331023
}
1034-
if self.check_compression(data):
1035-
data = self.compress_data(data)
1036-
return data
10371024

10381025
return json.dumps(data)
10391026
# new_list = json.dumps(new_list)
@@ -1997,7 +1984,7 @@ def check_cache_contains(self, key, value, append):
19971984
"reason": "Not found, not appending (2)!",
19981985
"key": key,
19991986
"search": value,
2000-
"value": json.loads(allvalues["value"]),
1987+
"value": allvalues["value"],
20011988
}
20021989

20031990
#parsedvalue.append(value)

0 commit comments

Comments
 (0)