diff --git a/sdc_aws_utils/aws.py b/sdc_aws_utils/aws.py index d90df83..608f45a 100644 --- a/sdc_aws_utils/aws.py +++ b/sdc_aws_utils/aws.py @@ -448,22 +448,6 @@ def push_science_file( file_key=new_file_key, ) - # Get tmp directory - temp_dir = Path(tempfile.gettempdir()) - - # Clean up temp files in the execution environment between runs - for filename in os.listdir(temp_dir): - file_path = os.path.join(temp_dir, filename) - log.info(f"{file_path}") - try: - # Check if it is a file or directory and remove accordingly - if os.path.isfile(file_path) or os.path.islink(file_path): - os.unlink(file_path) # Remove the file or link - elif os.path.isdir(file_path): - shutil.rmtree(file_path) # Remove the directory and its contents - except Exception as e: - print(f'Failed to delete {file_path}. Reason: {e}') - else: log.info( "File Processed Locally - File will not be uploaded,"