13th_fix combine download

This commit is contained in:
beabigegg
2025-09-04 10:21:16 +08:00
parent 5662fcc039
commit e5fd3e5ec3
10 changed files with 268 additions and 29 deletions

View File

@@ -73,13 +73,16 @@ def process_translation_job(self, job_id: int):
if result['success']:
logger.info(f"Translation job completed successfully: {job.job_uuid}")
# 重新獲取任務以確保狀態是最新的
db.session.refresh(job)
# 發送完成通知
try:
notification_service = NotificationService()
# 發送郵件通知
notification_service.send_job_completion_notification(job)
# 發送資料庫通知
notification_service.send_job_completion_db_notification(job)
# 發送資料庫通知 - 跳過狀態檢查,直接發送
notification_service.send_job_completion_db_notification_direct(job)
except Exception as e:
logger.warning(f"Failed to send completion notification: {str(e)}")