feat: add batch processing history and real-time status monitoring for team uploads
This commit is contained in:
@@ -167,6 +167,13 @@ func HandleTeamProcess(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
}
|
||||
|
||||
// 启动新任务前,先清理数据库中遗留的 running 状态批次
|
||||
if database.Instance != nil {
|
||||
if affected, err := database.Instance.CleanupStuckBatchRuns(); err == nil && affected > 0 {
|
||||
logger.Warning(fmt.Sprintf("清理了 %d 个遗留的运行中批次记录", affected), "", "team")
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化状态
|
||||
teamProcessState.Running = true
|
||||
teamProcessState.StartedAt = time.Now()
|
||||
|
||||
Reference in New Issue
Block a user