Commit 82cb1d3f authored by duanjinfei's avatar duanjinfei

update nil ponit

parent 1a00717c
......@@ -177,6 +177,9 @@ func (n *NodeManagerHandler) DistributionMsgWorker(nodeManagerMsgChan chan *node
HostPort: n.taskMsgWorker.getExternalPort(),
}
info := getHardwareInfo()
if info == nil {
continue
}
gpu := info.GPU
isMatch := false
for _, gpuInfo := range gpu {
......@@ -320,6 +323,9 @@ func (n *NodeManagerHandler) MonitorImageOp(op *nodemanagerV2.ModelOperate) {
return
}
info := getHardwareInfo()
if info == nil {
continue
}
memIsChange := false
for _, gpuInfo := range info.GPU {
if gpuInfo.Seq == model.GpuSeq {
......
......@@ -357,6 +357,9 @@ func DelModelRunningResp(params ...interface{}) *nodemanagerV2.WorkerMessage {
func getHardwareInfo() *nodemanagerV2.HardwareInfo {
hardwareInfo := utils.GetHardwareInfo(conf.GetConfig().HardwareUrl)
if hardwareInfo == nil {
return nil
}
gpusInfo := make([]*nodemanagerV2.GPUInfo, 0)
var diskTotal, diskFree int64
for _, disk := range hardwareInfo.Data.Disk {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment