fix: Windows permission error on ingest service tmp files (#1280)

This commit is contained in:
Francisco García Sierra 2023-11-20 10:08:03 +01:00 committed by GitHub
parent a09cd7a892
commit f1cbff0fb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -121,6 +121,7 @@ class IngestService:
path_to_tmp.write_text(str(file_data))
documents = reader.load_data(path_to_tmp)
finally:
tmp.close()
path_to_tmp.unlink()
logger.info(
"Transformed file=%s into count=%s documents", file_name, len(documents)