feat: customize workers and retry of task (close #5493 fix #5274)

This commit is contained in:
Andy Hsu
2023-11-21 15:51:08 +08:00
parent 11a30c5044
commit 7583c4d734
8 changed files with 82 additions and 31 deletions

View File

@ -35,7 +35,7 @@ func (t *CopyTask) Run() error {
return copyBetween2Storages(t, t.srcStorage, t.dstStorage, t.srcObjPath, t.dstDirPath)
}
var CopyTaskManager = tache.NewManager[*CopyTask]()
var CopyTaskManager *tache.Manager[*CopyTask]
// Copy if in the same storage, call move method
// if not, add copy task

View File

@ -30,7 +30,7 @@ func (t *UploadTask) Run() error {
return op.Put(t.Ctx(), t.storage, t.dstDirActualPath, t.file, t.SetProgress, true)
}
var UploadTaskManager = tache.NewManager[*UploadTask]()
var UploadTaskManager *tache.Manager[*UploadTask]
// putAsTask add as a put task and return immediately
func putAsTask(dstDirPath string, file model.FileStreamer) error {