|
|
|
@@ -8,6 +8,7 @@ import ( |
|
|
|
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/models" |
|
|
|
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils" |
|
|
|
"gorm.io/gorm" |
|
|
|
"strings" |
|
|
|
|
|
|
|
"github.com/zeromicro/go-zero/core/logx" |
|
|
|
) |
|
|
|
@@ -48,6 +49,14 @@ func (l *TaskDetailsLogic) TaskDetails(req *types.FId) (resp *types.TaskDetailsR |
|
|
|
} |
|
|
|
case "2": |
|
|
|
l.svcCtx.DbEngin.Table("task_hpc").Where("task_id", task.Id).Scan(&subList) |
|
|
|
for _, hpc := range subList { |
|
|
|
var cluster types.ClusterInfo |
|
|
|
tx := l.svcCtx.DbEngin.Table("t_cluster").Where("id = ?", hpc.ClusterId).Scan(&cluster) |
|
|
|
if tx.Error != nil { |
|
|
|
|
|
|
|
} |
|
|
|
hpc.WorkDir = strings.TrimPrefix(hpc.WorkDir, cluster.WorkDir) |
|
|
|
} |
|
|
|
} |
|
|
|
for _, sub := range subList { |
|
|
|
clusterIds = append(clusterIds, sub.ClusterId) |
|
|
|
|