CompleteBatch 完成批量上传
(batchID string)
| 526 | |
| 527 | // CompleteBatch 完成批量上传 |
| 528 | func (m *BatchUploadManager) CompleteBatch(batchID string) error { |
| 529 | batch, err := m.GetBatch(batchID) |
| 530 | if err != nil { |
| 531 | return err |
| 532 | } |
| 533 | |
| 534 | batch.Status = "completed" |
| 535 | batch.UpdatedAt = time.Now() |
| 536 | |
| 537 | m.progressStorage.SaveBatch(batch) |
| 538 | return nil |
| 539 | } |
| 540 | |
| 541 | // 以下为对 BatchUpload 的并发安全访问器,避免包外直接访问未导出字段 mu |
| 542 |