优化异步执行创建版本
This commit is contained in:
parent
39f7b05869
commit
658ad688d3
|
@ -738,17 +738,18 @@ public class ModelsServiceImpl implements ModelsService {
|
|||
modelDependency.setMeta(meta);
|
||||
modelDependency1Dao.insert(modelDependency);
|
||||
|
||||
// 配置远程S3地址
|
||||
String s3Path = "management-platform-files/" + ci4sUsername + "/model/" + modelsVo.getId() + "/" + repositoryName + "/" + branchName;
|
||||
dvcUtils.dvcRemoteAdd(rootPath, s3Path);
|
||||
dvcUtils.dvcConfigS3Credentials(rootPath, endpoint);
|
||||
dvcUtils.dvcConfigS3Credentials2(rootPath, accessKeyId);
|
||||
dvcUtils.dvcConfigS3Credentials3(rootPath, secretAccessKey);
|
||||
// dvc 跟踪
|
||||
dvcUtils.dvcAdd(rootPath, "model");
|
||||
dvcUtils.pushNewBranchToRemote(rootPath, gitLinkUsername, gitLinkPassword, branchName);
|
||||
|
||||
CompletableFuture.supplyAsync(() -> {
|
||||
try {
|
||||
// 配置远程S3地址
|
||||
String s3Path = "management-platform-files/" + ci4sUsername + "/model/" + modelsVo.getId() + "/" + repositoryName + "/" + branchName;
|
||||
dvcUtils.dvcRemoteAdd(rootPath, s3Path);
|
||||
dvcUtils.dvcConfigS3Credentials(rootPath, endpoint);
|
||||
dvcUtils.dvcConfigS3Credentials2(rootPath, accessKeyId);
|
||||
dvcUtils.dvcConfigS3Credentials3(rootPath, secretAccessKey);
|
||||
// dvc 跟踪
|
||||
dvcUtils.dvcAdd(rootPath, "model");
|
||||
dvcUtils.pushNewBranchToRemote(rootPath, gitLinkUsername, gitLinkPassword, branchName);
|
||||
//dvc push 到远程S3
|
||||
dvcUtils.dvcPush(rootPath);
|
||||
} catch (Exception e) {
|
||||
|
@ -756,9 +757,8 @@ public class ModelsServiceImpl implements ModelsService {
|
|||
}
|
||||
return null;
|
||||
});
|
||||
return "新增模型版本成功";
|
||||
}
|
||||
return null;
|
||||
return "新增模型版本成功";
|
||||
}
|
||||
|
||||
|
||||
|
@ -871,7 +871,7 @@ public class ModelsServiceImpl implements ModelsService {
|
|||
String modelTagName = modelsVo.getModelTag();
|
||||
String modelTypeName = modelsVo.getModelType();
|
||||
|
||||
String url = gitendpoint + "/api/projects.json?user_id=" + userId + "&sort_by=praises_count";
|
||||
String url = gitendpoint + "/api/projects.json";
|
||||
|
||||
String name = modelsVo.getName();
|
||||
if (StringUtils.isNotEmpty(name)) {
|
||||
|
|
|
@ -214,17 +214,18 @@ public class NewDatasetServiceImpl implements NewDatasetService {
|
|||
addDatasetSourceToDataVo(datasetVo);
|
||||
|
||||
YamlUtils.generateYamlFile(JsonUtils.objectToMap(datasetVo), localPath, "dataset");
|
||||
//dvc数据跟踪
|
||||
// 配置远程S3地址
|
||||
dvcUtils.dvcRemoteAdd(localPath, s3Path);
|
||||
dvcUtils.dvcConfigS3Credentials(localPath, endpoint);
|
||||
dvcUtils.dvcConfigS3Credentials2(localPath, accessKeyId);
|
||||
dvcUtils.dvcConfigS3Credentials3(localPath, secretAccessKey);
|
||||
// dvc 跟踪
|
||||
dvcUtils.dvcAdd(localPath, "dataset");
|
||||
dvcUtils.pushNewBranchToRemote(localPath, gitLinkUsername, gitLinkPassword, branchName);
|
||||
|
||||
CompletableFuture.supplyAsync(() -> {
|
||||
try {
|
||||
//dvc数据跟踪
|
||||
// 配置远程S3地址
|
||||
dvcUtils.dvcRemoteAdd(localPath, s3Path);
|
||||
dvcUtils.dvcConfigS3Credentials(localPath, endpoint);
|
||||
dvcUtils.dvcConfigS3Credentials2(localPath, accessKeyId);
|
||||
dvcUtils.dvcConfigS3Credentials3(localPath, secretAccessKey);
|
||||
// dvc 跟踪
|
||||
dvcUtils.dvcAdd(localPath, "dataset");
|
||||
dvcUtils.pushNewBranchToRemote(localPath, gitLinkUsername, gitLinkPassword, branchName);
|
||||
//dvc push 到远程S3
|
||||
dvcUtils.dvcPush(localPath);
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -25,8 +25,9 @@ public class GitProjectVo implements Serializable {
|
|||
@ApiModelProperty(value = "项目标识", required = true)
|
||||
private String repositoryName;
|
||||
|
||||
// @ApiModelProperty(value = "项目分类ID", required = false)
|
||||
// private int projectCategoryId;
|
||||
@ApiModelProperty(value = "项目分类ID", required = false)
|
||||
private int projectCategoryId;
|
||||
|
||||
//
|
||||
// @ApiModelProperty(value = "项目语言ID", required = false)
|
||||
// private int projectLanguageId;
|
||||
|
|
Loading…
Reference in New Issue