This commit is contained in:
truewhile
2026-08-26 09:51:27 +08:00
parent 0e7dbd6215
commit 9d359c40dd
6 changed files with 91 additions and 27 deletions
+5
View File
@@ -511,6 +511,11 @@ func (s *StrmService) CancelPendingDownloadTasks(ctx context.Context) (int64, er
return s.repo.StrmDownload.CancelPending(ctx)
}
// CancelPendingUploadTasks 批量取消所有排队上传任务,返回取消数量。
func (s *StrmService) CancelPendingUploadTasks(ctx context.Context) (int64, error) {
return s.repo.StrmUpload.CancelPending(ctx)
}
func sleepContext(ctx context.Context, d time.Duration) {
select {
case <-ctx.Done():