diff --git a/scripts/untar_gz_files.py b/scripts/untar_gz_files.py index 169e5178..4b683eb2 100755 --- a/scripts/untar_gz_files.py +++ b/scripts/untar_gz_files.py @@ -75,6 +75,16 @@ def main(bucket: str, subdir: str, blob_name: str, outdir: str): subprocess.run(['rm', f'{filepath}'], check=True) logging.info(f'Deleted {file} from disk') + # Move the tarball to the "completed" directory + subprocess.run( + [ + 'gsutil', + 'mv', + f'gs://{bucket}/{subdir}/{os.path.basename(blob_name)}', + f'gs://{bucket}/{subdir}/completed/{os.path.basename(blob_name)}', + ], + check=True, + ) logging.info('All tarballs extracted and uploaded. Finishing...')