From c605b2d9e98b1cb61b310e45a76ec3f14352c2f0 Mon Sep 17 00:00:00 2001 From: Jay Date: Sun, 16 Jun 2019 13:13:20 +0000 Subject: [PATCH] disable send data to es --- main.go | 9 ++++----- module/line-message/message-type.go | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/main.go b/main.go index 89c720a..31c104a 100644 --- a/main.go +++ b/main.go @@ -12,7 +12,6 @@ import ( "git.trj.tw/golang/mtfosbot/module/apis/twitch" "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/utils" @@ -79,10 +78,10 @@ func main() { log.Fatal(errors.New("log image root not exists")) } - err = es.NewClient() - if err != nil { - log.Println("es create client error :: ", err) - } + // err = es.NewClient() + // if err != nil { + // log.Println("es create client error :: ", err) + // } server.Run(strings.Join([]string{":", strconv.Itoa(config.GetConf().Port)}, "")) } diff --git a/module/line-message/message-type.go b/module/line-message/message-type.go index 0a60fb9..f5dd893 100644 --- a/module/line-message/message-type.go +++ b/module/line-message/message-type.go @@ -108,7 +108,7 @@ func saveTextMsgToLog(txt string, s *lineobj.SourceObject) { 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") } @@ -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") }