3D模型数据资源备份镜像批量处理

This commit is contained in:
momo 2023-11-21 14:33:52 +08:00
parent 3749f04e6a
commit d074a56b83

View File

@ -7,7 +7,6 @@ import (
"fusenapi/utils/s3url_to_s3id"
"regexp"
"strings"
"time"
"context"
@ -140,13 +139,10 @@ func (l *ResourceBackupLogic) ResourceBackup(req *types.ResourceBackupReq, useri
upload.AliyunOSS.Endpoint = l.svcCtx.Config.AliyunOSS.Endpoint
upload.AliyunOSS.BasePath = l.svcCtx.Config.AliyunOSS.BasePath
for k, v := range urls {
var resourceId = k
time.AfterFunc(time.Second*1, func() {
err := upload.UploadFileByUrl(resourceId, v, 2)
if err != nil {
l.Logger.Errorf("更新文件镜像备份, err: %v, key: %v, val:%v", err, k, v)
}
})
err := upload.UploadFileByUrl(k, v, 2)
if err != nil {
l.Logger.Errorf("更新文件镜像备份, err: %v, key: %v, val:%v", err, k, v)
}
}
return resp.SetStatus(basic.CodeOK)
}