diff --git a/backend/pashub_fetcher/handler/handler.py b/backend/pashub_fetcher/handler/handler.py index 60b946c1..01f1a881 100644 --- a/backend/pashub_fetcher/handler/handler.py +++ b/backend/pashub_fetcher/handler/handler.py @@ -174,6 +174,12 @@ def process_job( # if job.sharepoint_link: # upload_job_to_sharepoint(sharepoint_client, job.sharepoint_link, job_files) + for file_path in job_files: + try: + os.remove(file_path) + except OSError: + logger.warning(f"Failed to delete temp file {file_path}") + return job_files