caarleexx commited on
Commit
bca8d8c
·
verified ·
1 Parent(s): 29eaed0

Update api/core/file_handler.py

Browse files
Files changed (1) hide show
  1. api/core/file_handler.py +6 -1
api/core/file_handler.py CHANGED
@@ -4,6 +4,7 @@ from api.config import settings
4
  import json
5
  from datetime import datetime
6
 
 
7
  class FileHandler:
8
  """Gerenciador de arquivos"""
9
 
@@ -27,4 +28,8 @@ class FileHandler:
27
  """Limpa arquivos temporários"""
28
  temp_file = settings.TEMP_DIR / f"{batch_id}.jsonl"
29
  if temp_file.exists():
30
- temp_file.unlink()
 
 
 
 
 
4
  import json
5
  from datetime import datetime
6
 
7
+
8
  class FileHandler:
9
  """Gerenciador de arquivos"""
10
 
 
28
  """Limpa arquivos temporários"""
29
  temp_file = settings.TEMP_DIR / f"{batch_id}.jsonl"
30
  if temp_file.exists():
31
+ temp_file.unlink()
32
+
33
+ def get_temp_file(self, batch_id: str) -> Path:
34
+ """Retorna caminho do arquivo temporário"""
35
+ return settings.TEMP_DIR / f"{batch_id}.jsonl"