MCPcopy Create free account
hub / github.com/53AI/53AIHub / CancelBatch

Method CancelBatch

api/service/batch_upload_manager.go:428–441  ·  view source on GitHub ↗

CancelBatch 取消批量上传

(batchID string)

Source from the content-addressed store, hash-verified

426
427// CancelBatch 取消批量上传
428func (m *BatchUploadManager) CancelBatch(batchID string) error {
429 batch, err := m.GetBatch(batchID)
430 if err != nil {
431 return err
432 }
433
434 m.mu.Lock()
435 batch.Status = "cancelled"
436 batch.UpdatedAt = time.Now()
437 m.mu.Unlock()
438
439 m.progressStorage.SaveBatch(batch)
440 return nil
441}
442
443// IsBatchCancelled 判断批次是否已取消
444func (m *BatchUploadManager) IsBatchCancelled(batchID string) bool {

Callers

nothing calls this directly

Calls 3

GetBatchMethod · 0.95
SaveBatchMethod · 0.80
UnlockMethod · 0.65

Tested by

no test coverage detected