Skip to content

Commit b5f52e9

Browse files
committed
no gzip for minio
1 parent 56c4358 commit b5f52e9

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

osprey_worker/src/osprey/worker/lib/storage/stored_execution_result.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -382,11 +382,6 @@ def select_one(self, action_id: int) -> Optional[Dict[str, Any]]:
382382
response.close()
383383
response.release_conn()
384384

385-
try:
386-
raw_data = gzip.decompress(raw_data)
387-
except gzip.BadGzipFile:
388-
pass
389-
390385
data = json.loads(raw_data.decode('utf-8'))
391386
result = self._execution_result_dict_from_minio_data(data)
392387
return result
@@ -431,18 +426,16 @@ def insert(
431426
}
432427

433428
json_data = json.dumps(data)
434-
compressed_data = gzip.compress(json_data.encode('utf-8'))
435-
429+
436430
from io import BytesIO
437-
data_stream = BytesIO(compressed_data)
431+
data_stream = BytesIO(json_data.encode('utf-8'))
438432

439433
self._minio_client.put_object(
440434
self._bucket_name,
441435
object_name,
442436
data_stream,
443-
length=len(compressed_data),
444-
content_type='application/json',
445-
metadata={'Content-Encoding': 'gzip'}
437+
length=len(json_data.encode('utf-8')),
438+
content_type='application/json'
446439
)
447440

448441
except Exception as e:

0 commit comments

Comments
 (0)