优化代码

This commit is contained in:
刘祥超
2022-07-17 17:08:28 +08:00
parent 2484cd4ae6
commit bc7ee19962
2 changed files with 11 additions and 8 deletions

View File

@@ -50,7 +50,7 @@ func (this *NodeTaskService) FindNodeTasks(ctx context.Context, req *pb.FindNode
return nil, err
}
if status != nil && len(status.OS) > 0 && len(status.Arch) > 0 && len(status.BuildVersion) > 0 {
deployFile := installers.SharedDeployManager.FindNodeFile(status.OS, status.Arch)
var deployFile = installers.SharedDeployManager.FindNodeFile(status.OS, status.Arch)
if deployFile != nil {
if stringutil.VersionCompare(deployFile.Version, status.BuildVersion) > 0 {
pbTasks = append(pbTasks, &pb.NodeTask{