|
|
@@ -357,7 +357,7 @@ class PairedImageSaver:
|
|
|
self._save_batch_info_txt(batch, txt_path)
|
|
|
|
|
|
# 校验 OSS URL 不能为 null,上报前确保所有图片已上传
|
|
|
- upload_status = self._get_upload_status(batch.batch_id)
|
|
|
+ upload_status = self._upload_status.get(batch.batch_id, {})
|
|
|
missing_urls = []
|
|
|
|
|
|
# 检查全景图
|
|
|
@@ -395,11 +395,11 @@ class PairedImageSaver:
|
|
|
|
|
|
logger.info(f"[配对保存] 批次完成: {batch.batch_id}")
|
|
|
|
|
|
- # 清理旧批次
|
|
|
- self._cleanup_old_batches()
|
|
|
-
|
|
|
except Exception as e:
|
|
|
logger.error(f"[配对保存] 异步完成批次失败: {e}")
|
|
|
+ finally:
|
|
|
+ # 确保清理逻辑始终执行
|
|
|
+ self._cleanup_old_batches()
|
|
|
|
|
|
def _queue_save_task(self, task: Dict):
|
|
|
"""添加保存任务到队列"""
|