Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions shuffle-tools/1.2.0/src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,16 +720,6 @@ def preload_cache(self, key):
response_data["value"] = parsed
return get_response.json()

def check_compression(self, obj, threshold=1_000_000):
data_btyes = json.dumps(obj).encode("utf-8")
if len(data_btyes) > threshold:
return True
return False

def compress_data(self, obj):
data_btyes = json.dumps(obj).encode("utf-8")
compressed_data = gzip.compress(data_btyes)
return base64.b64encode(compressed_data).decode("utf-8")

def update_cache(self, key):
org_id = self.full_execution["workflow"]["execution_org"]["id"]
Expand Down Expand Up @@ -1031,9 +1021,6 @@ def filter_list(self, input_list, field, check, value, opposite):
"valid": new_list,
"invalid": failed_list,
}
if self.check_compression(data):
data = self.compress_data(data)
return data

return json.dumps(data)
# new_list = json.dumps(new_list)
Expand Down Expand Up @@ -1997,7 +1984,7 @@ def check_cache_contains(self, key, value, append):
"reason": "Not found, not appending (2)!",
"key": key,
"search": value,
"value": json.loads(allvalues["value"]),
"value": allvalues["value"],
}

#parsedvalue.append(value)
Expand Down
Loading