diff --git a/app/http/tcppool/single.go b/app/http/tcppool/single.go index 5f1f429..a8579a6 100644 --- a/app/http/tcppool/single.go +++ b/app/http/tcppool/single.go @@ -127,7 +127,7 @@ func (t *TcpHelper) resend() { var nowTime = time.Now().Unix() for _, v := range rs { json.Unmarshal([]byte(v), &data) - if (data["send_time"].(float64) - float64(nowTime)) > 60 { + if (float64(nowTime) - data["send_time"].(float64)) > 60 { t.SendMsg([]byte(v)) } } diff --git a/app/utils/mq/kafka_v2.go b/app/utils/mq/kafka_v2.go index 6dddb7c..37b4823 100644 --- a/app/utils/mq/kafka_v2.go +++ b/app/utils/mq/kafka_v2.go @@ -103,6 +103,8 @@ func (kk KafkaV2Mq) Consume(name string, hand interface{}, ci int) { } else { //utils.Log(nil, "对列放开") } + + time.Sleep(3 * time.Minute) msg, err := consumer.ReadMessage(1 * time.Second) if err == nil { utils.Log(nil, "offset", msg.TopicPartition.Offset)