zhangqian
2023-09-02 74c155ba2112a6e9f3be730e1656a157d2f6cefc
update
1个文件已添加
1个文件已修改
9 ■■■■ 已修改文件
nsq/msg_handler.go 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
start.sh 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
nsq/msg_handler.go
@@ -100,7 +100,10 @@
    err = json.Unmarshal(data, &resp)
    if err != nil {
        logx.Errorf("ScheduleTask HandleMessage Unmarshal json err: %v", err.Error())
        return err
        return nil
    }
    if len(resp.KeyData) == 0 || len(resp.AddressData) == 0 {
        return nil
    }
    //写入到文件
    err = file.WriteFile(fmt.Sprintf("%s%s", constvar.PlcAddressDataPath, constvar.PlcAddressDataKeyFileName), resp.KeyData)
start.sh
New file
@@ -0,0 +1,4 @@
#!/bin/sh
chmod +x apsClient
pkill apsClient
nohup ./apsClient &>/dev/null &