Skip to content

Commit 83f0cb5

Browse files
committed
small improvements with compression management
1 parent 3843191 commit 83f0cb5

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

batch-compression-management/bgz.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Resources:
5454
PlatformCapabilities:
5555
- 'FARGATE'
5656
Timeout:
57-
AttemptDurationSeconds: 7200
57+
AttemptDurationSeconds: 20400
5858
ContainerProperties:
5959
Image: !Sub '${AWS::AccountId}.dkr.ecr.us-east-1.amazonaws.com/bgzip-repo'
6060
Command:
@@ -86,7 +86,7 @@ Resources:
8686
PlatformCapabilities:
8787
- 'FARGATE'
8888
Timeout:
89-
AttemptDurationSeconds: 7200
89+
AttemptDurationSeconds: 20400
9090
ContainerProperties:
9191
Image: !Sub '${AWS::AccountId}.dkr.ecr.us-east-1.amazonaws.com/bgzip-repo'
9292
Command:

batch-compression-management/compress_json_files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def bg_compress_and_index_file(bucket_name, file, boto_s3, files_to_retry, print
4040
# Run bgzip compression and capture stderr
4141
command = ['bgzip', '-i', f"s3://{bucket_name}/{file}"]
4242
try:
43-
result = subprocess.run(command, check=True, timeout=600,
43+
result = subprocess.run(command, check=True, timeout=1200,
4444
stdout=subprocess.DEVNULL, stderr=subprocess.PIPE,
4545
universal_newlines=True)
4646
stderr_output = result.stderr

batch-compression-management/delete_json_files.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def main(index, bucket, path):
1919

2020

2121
def delete_json_file(bucket_name, file, boto_s3, files_to_retry, print_lock):
22+
print("Attempting to delete file: ", file)
2223
results = boto_s3.list_objects(Bucket=bucket_name, Prefix=file + ".gz")
2324
if results.get('Contents', None) and len(results.get('Contents')) == 2:
2425
with print_lock:

0 commit comments

Comments
 (0)