032: dead code cleanup — remove sync APIClient, _llm_http, preview_llm_client, fix retry chains

This commit is contained in:
2026-06-05 08:31:18 +03:00
parent 90b191529d
commit cf7f69b4c1
9 changed files with 20 additions and 460 deletions

View File

@@ -45,7 +45,7 @@ class TranslationRunRetryManager:
# region retry_failed_batches [TYPE Function]
# @PURPOSE: Retry failed batches in a run.
# @SIDE_EFFECT Re-executes batch translations; DB writes.
def retry_failed_batches(self, run_id: str) -> TranslationRun:
async def retry_failed_batches(self, run_id: str) -> TranslationRun:
with belief_scope("TranslationRunRetryManager.retry_failed_batches"):
run = self.db.query(TranslationRun).filter(TranslationRun.id == run_id).first()
if not run:
@@ -95,7 +95,7 @@ class TranslationRunRetryManager:
}
for rec in failed_records
]
result = executor._process_batch(
result = await executor._process_batch(
job=job, run_id=run_id, batch_index=batch.batch_index,
batch_rows=retry_rows,
)
@@ -122,8 +122,8 @@ class TranslationRunRetryManager:
# region retry_insert [TYPE Function]
# @PURPOSE: Retry the SQL insert phase for a completed run.
# @SIDE_EFFECT Superset API call; DB writes.
def retry_insert(self, run_id: str) -> TranslationRun:
return _retry_insert(self.db, self.config_manager, self.event_log, self.current_user, run_id)
async def retry_insert(self, run_id: str) -> TranslationRun:
return await _retry_insert(self.db, self.config_manager, self.event_log, self.current_user, run_id)
# endregion retry_insert
# region cancel_run [TYPE Function]