Skip to content

Commit

Permalink
Merge pull request #394 from yashsinghcodes/new
Browse files Browse the repository at this point in the history
removed gzip
  • Loading branch information
yashsinghcodes authored Jan 14, 2025
2 parents 64d42b3 + de9ca71 commit 230c0da
Showing 1 changed file with 1 addition and 14 deletions.
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

0 comments on commit 230c0da

Please sign in to comment.