change log level
Former-commit-id: f8155160b352fb6602fd34ca8efff37659ceab65
This commit is contained in:
parent
40ea4818a4
commit
374bb1a5ad
|
@ -2,6 +2,7 @@ package hpc
|
|||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
clientCore "gitlink.org.cn/JointCloud/pcm-coordinator/api/client"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/constants"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/models"
|
||||
|
@ -55,6 +56,9 @@ func (l *CommitHpcTaskLogic) CommitHpcTask(req *types.CommitHpcTaskReq) (resp *t
|
|||
adapterId, _ := strconv.ParseInt(req.AdapterId, 10, 64)
|
||||
var adapterName string
|
||||
l.svcCtx.DbEngin.Raw("SELECT name FROM `t_adapter` where id = ?", req.AdapterId).Scan(&adapterName)
|
||||
if len(adapterName) == 0 || adapterName == "" {
|
||||
return nil, errors.New("no corresponding adapter found")
|
||||
}
|
||||
clusterId := clusterIds[rand.Intn(len(clusterIds))]
|
||||
var clusterName string
|
||||
l.svcCtx.DbEngin.Raw("SELECT nickname FROM `t_cluster` where id = ?", clusterId).Scan(&clusterName)
|
||||
|
|
|
@ -91,7 +91,7 @@ func NewServiceContext(c config.Config) *ServiceContext {
|
|||
NamingStrategy: schema.NamingStrategy{
|
||||
SingularTable: true, // 使用单数表名,启用该选项,此时,`User` 的表名应该是 `t_user`
|
||||
},
|
||||
Logger: logger.Default.LogMode(logger.Info),
|
||||
Logger: logger.Default.LogMode(logger.Error),
|
||||
})
|
||||
if err != nil {
|
||||
logx.Errorf("数据库连接失败, err%v", err)
|
||||
|
|
Loading…
Reference in New Issue