3D模型数据资源备份镜像批量处理
This commit is contained in:
parent
c1a164da7a
commit
7ef4139f4e
|
@ -20,7 +20,7 @@ type StepPriceJsonStruct struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *FsProductModel3dModel) FindAll(ctx context.Context) (resp []FsProductModel3d, err error) {
|
func (t *FsProductModel3dModel) FindAll(ctx context.Context) (resp []FsProductModel3d, err error) {
|
||||||
err = t.db.WithContext(ctx).Model(&FsProductModel3d{}).Find(&resp).Error
|
err = t.db.WithContext(ctx).Model(&FsProductModel3d{}).Limit(10).Find(&resp).Error
|
||||||
return resp, err
|
return resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -139,7 +139,7 @@ func (l *ResourceBackupLogic) ResourceBackup(req *types.ResourceBackupReq, useri
|
||||||
upload.AliyunOSS.Endpoint = l.svcCtx.Config.AliyunOSS.Endpoint
|
upload.AliyunOSS.Endpoint = l.svcCtx.Config.AliyunOSS.Endpoint
|
||||||
upload.AliyunOSS.BasePath = l.svcCtx.Config.AliyunOSS.BasePath
|
upload.AliyunOSS.BasePath = l.svcCtx.Config.AliyunOSS.BasePath
|
||||||
for k, v := range urls {
|
for k, v := range urls {
|
||||||
err := upload.UploadFileByUrl(k, v, 2)
|
err := upload.UploadFileByUrl(k, v, 1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
l.Logger.Errorf("更新文件镜像备份失败, err: %v, key: %v, val:%v", err, k, v)
|
l.Logger.Errorf("更新文件镜像备份失败, err: %v, key: %v, val:%v", err, k, v)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user