diff --git a/def.go b/def.go index bf82122..f9c568e 100644 --- a/def.go +++ b/def.go @@ -45,4 +45,6 @@ const ( cmdParseModePlain = 1 cmdParseModeMarkDown = 2 cmdParseModeHTML = 3 + + KeepAliveHeartBeatSeconds = 5 ) diff --git a/mq.go b/mq.go index 716bd21..5ea4b7a 100644 --- a/mq.go +++ b/mq.go @@ -86,7 +86,6 @@ func MQReceiveMsgWorker(id int, cmd chan<- TGCommand) { err = json.Unmarshal(d.Body, &c) logOnError(err, "MQReceiveMsgWorker["+strconv.Itoa(id)+"] : Can't unmarshal.\n"+string(d.Body)) if err == nil { - log.Printf("****************************** New MQ message ******************************\n%s\n****************************************************************************\n", string(d.Body)) cmd <- c } } @@ -139,7 +138,7 @@ func MQKeepAliveWorker() { logOnError(err, "MQKeepAliveWorker : Publishing message.") } } - time.Sleep(time.Minute) + time.Sleep(KeepAliveHeartBeatSeconds * time.Second) } log.Printf("MQKeepAliveWorker : Closing.") }