|
@@ -1,27 +0,0 @@
|
|
|
-package rpcpush
|
|
|
-
|
|
|
-import (
|
|
|
- "config"
|
|
|
- "encoding/json"
|
|
|
- "log"
|
|
|
- "net/rpc"
|
|
|
- "qfw/util"
|
|
|
-)
|
|
|
-
|
|
|
-func AppPushServiceCall(m map[string]interface{}) bool {
|
|
|
- defer util.Catch()
|
|
|
- var repl string
|
|
|
- client, err := rpc.DialHTTP("tcp", config.Sysconfig["appPushServiceRpc"].(string))
|
|
|
- if err != nil {
|
|
|
- log.Println(err.Error())
|
|
|
- return false
|
|
|
- }
|
|
|
- defer client.Close()
|
|
|
- b, _ := json.Marshal(m)
|
|
|
- err = client.Call("Rpc.Push", b, &repl)
|
|
|
- if err != nil {
|
|
|
- log.Println(err.Error())
|
|
|
- return false
|
|
|
- }
|
|
|
- return repl == "y"
|
|
|
-}
|