refactor: 机器文件操作优化

This commit is contained in:
meilin.huang
2023-07-05 00:26:00 +08:00
parent 3266039aaf
commit f4ac6d8360
12 changed files with 164 additions and 50 deletions

View File

@@ -70,7 +70,9 @@ func (m *MachineScript) RunMachineScript(rc *req.Ctx) {
res, err := cli.Run(script)
// 记录请求参数
rc.ReqParam = fmt.Sprintf("[machine: %s, scriptId: %d, name: %s]", cli.GetMachine().GetLogDesc(), scriptId, ms.Name)
biz.ErrIsNilAppendErr(err, "执行命令失败:%s")
if res == "" {
biz.ErrIsNilAppendErr(err, "执行命令失败:%s")
}
rc.ResData = res
}