|
@@ -1,6 +1,7 @@
|
|
|
package internal
|
|
|
|
|
|
import (
|
|
|
+ "fmt"
|
|
|
"sparrow/pkg/rpcs"
|
|
|
"sparrow/pkg/rule"
|
|
|
"sparrow/pkg/server"
|
|
@@ -36,6 +37,7 @@ func (a *TaskExecutor) doDeviceIssueTask(entityId, subEntityId string, action *r
|
|
|
if err != nil {
|
|
|
return err
|
|
|
}
|
|
|
+ fmt.Printf("rpchost:%s", rpchost)
|
|
|
args := rpcs.ArgsSendCommand{
|
|
|
DeviceId: entityId,
|
|
|
SubDevice: subEntityId,
|
|
@@ -58,10 +60,10 @@ func getAccessRPCHost(deviceid string) (string, error) {
|
|
|
Id: deviceid,
|
|
|
}
|
|
|
reply := &rpcs.ReplyGetDeviceOnlineStatus{}
|
|
|
+ fmt.Println("ggggggggggggggggggggggggggg")
|
|
|
err := server.RPCCallByName(nil, rpcs.DeviceManagerName, "DeviceManager.GetDeviceOnlineStatus", args, reply)
|
|
|
if err != nil {
|
|
|
return "", err
|
|
|
}
|
|
|
-
|
|
|
return reply.AccessRPCHost, nil
|
|
|
}
|