freeze fix

This commit is contained in:
2026-06-02 16:36:00 +03:00
parent 9810812809
commit f4fe9b9dcd
13 changed files with 1171 additions and 181 deletions

View File

@@ -224,12 +224,28 @@ class BatchProcessingService:
if tb["warning"]:
logger.explore("Token budget warning", {"batch_id": bid, "warning": tb["warning"]})
return self._llm_service.call_llm_for_batch(
logger.reason(
f"LLM process batch start", {
"batch_id": bid, "llm_rows": len(rows_for_llm),
"provider_model": provider_model,
"max_output_needed": tb.get("max_output_needed"),
"estimated_input_tokens": tb.get("estimated_input_tokens"),
},
)
result = self._llm_service.call_llm_for_batch(
job=job, run_id=run_id, batch_rows=rows_for_llm,
dict_matches=dict_matches, batch_id=bid,
max_tokens=tb["max_output_needed"],
)
logger.reason(
f"LLM process batch complete", {
"batch_id": bid, **result,
},
)
return result
# -- Batch insert (delegation) --
def insert_batch_to_target(self, job: TranslationJob, batch_id: str, run_id: str) -> None:
insert_batch_to_target(self.db, self.config_manager, job, batch_id, run_id)