disable send data to es

This commit is contained in:
Jay 2019-06-16 13:13:20 +00:00
parent f8e79ef9fa
commit c605b2d9e9
2 changed files with 6 additions and 7 deletions

View File

@ -12,7 +12,6 @@ import (
"git.trj.tw/golang/mtfosbot/module/apis/twitch" "git.trj.tw/golang/mtfosbot/module/apis/twitch"
"git.trj.tw/golang/mtfosbot/module/cmd" "git.trj.tw/golang/mtfosbot/module/cmd"
"git.trj.tw/golang/mtfosbot/module/es"
"git.trj.tw/golang/mtfosbot/module/options" "git.trj.tw/golang/mtfosbot/module/options"
"git.trj.tw/golang/mtfosbot/module/utils" "git.trj.tw/golang/mtfosbot/module/utils"
@ -79,10 +78,10 @@ func main() {
log.Fatal(errors.New("log image root not exists")) log.Fatal(errors.New("log image root not exists"))
} }
err = es.NewClient() // err = es.NewClient()
if err != nil { // if err != nil {
log.Println("es create client error :: ", err) // log.Println("es create client error :: ", err)
} // }
server.Run(strings.Join([]string{":", strconv.Itoa(config.GetConf().Port)}, "")) server.Run(strings.Join([]string{":", strconv.Itoa(config.GetConf().Port)}, ""))
} }

View File

@ -108,7 +108,7 @@ func saveTextMsgToLog(txt string, s *lineobj.SourceObject) {
return return
} }
go saveLineMessageLogToES(s.GroupID, s.UserID, txt, "text") // go saveLineMessageLogToES(s.GroupID, s.UserID, txt, "text")
model.AddLineMessageLog(s.GroupID, s.UserID, txt, "text") model.AddLineMessageLog(s.GroupID, s.UserID, txt, "text")
} }
@ -163,7 +163,7 @@ func saveImageMsgToLog(id string, s *lineobj.SourceObject) {
} }
} }
go saveLineMessageLogToES(s.GroupID, s.UserID, fname, "image") // go saveLineMessageLogToES(s.GroupID, s.UserID, fname, "image")
model.AddLineMessageLog(s.GroupID, s.UserID, fname, "image") model.AddLineMessageLog(s.GroupID, s.UserID, fname, "image")
} }