|
@@ -21,10 +21,10 @@ var ChanB chan bool
|
|
|
|
|
|
func init() {
|
|
|
qu.ReadConfig(&Sysconfig)
|
|
|
- MgoIP = qu.ObjToString(Sysconfig["mongodb_two_ip"])
|
|
|
- MgoDB = qu.ObjToString(Sysconfig["mongodb_two_db"])
|
|
|
- MgoC = qu.ObjToString(Sysconfig["mongodb_two_c"])
|
|
|
- MgoFileFiled = qu.ObjToStringDef(Sysconfig["mongodb_two_filefiled"], "projectinfo")
|
|
|
+ MgoIP = qu.ObjToString(Sysconfig["mongodb_one_ip"])
|
|
|
+ MgoDB = qu.ObjToString(Sysconfig["mongodb_one_db"])
|
|
|
+ MgoC = qu.ObjToString(Sysconfig["mongodb_one_c"])
|
|
|
+ MgoFileFiled = qu.ObjToStringDef(Sysconfig["mongodb_one_filefiled"], "projectinfo")
|
|
|
if strings.TrimSpace(MgoIP) == "" || strings.TrimSpace(MgoDB) == "" || strings.TrimSpace(MgoC) == "" {
|
|
|
log.Println("获取配置文件参数失败", Sysconfig)
|
|
|
return
|
|
@@ -41,7 +41,7 @@ func main() {
|
|
|
b := make(chan bool, 1)
|
|
|
<-b
|
|
|
}
|
|
|
-
|
|
|
+// "file2text": "192.168.3.207:1234",
|
|
|
func processUdpMsg(act byte, data []byte, ra *net.UDPAddr) {
|
|
|
defer qu.Catch()
|
|
|
switch act {
|
|
@@ -150,6 +150,10 @@ func save(mid interface{}, qmap, fileinfo map[string]interface{}) {
|
|
|
// {"Name": "test6.xlsx", "Content": "test6context", "Type": "xlsx", "Size": "60M"},
|
|
|
//}
|
|
|
//reply, _ = json.Marshal(testfiles)
|
|
|
+ if len(reply) == 0{
|
|
|
+ log.Println(mid, "rpc返回数据为空:", string(reply))
|
|
|
+ return
|
|
|
+ }
|
|
|
log.Println(mid, string(reply))
|
|
|
rdata := make(map[string]interface{})
|
|
|
if err := json.Unmarshal(reply, &rdata); err != nil {
|