Compare commits
3 Commits
679154720f
...
2a93e1cc38
Author | SHA1 | Date |
---|---|---|
|
2a93e1cc38 | |
|
90a4ad85d0 | |
|
2c62f5d38a |
|
@ -144,6 +144,7 @@ func (t *TcpHelper) watch(conn net.Conn) {
|
||||||
} else {
|
} else {
|
||||||
atomic.StoreInt32(t.Full, 1)
|
atomic.StoreInt32(t.Full, 1)
|
||||||
utils.Log(nil, "连接关闭", err)
|
utils.Log(nil, "连接关闭", err)
|
||||||
|
t.reconnect(config.GetConf().OrderPort)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
time.Sleep(1 * time.Second)
|
time.Sleep(1 * time.Second)
|
||||||
|
|
|
@ -95,7 +95,7 @@ func (kk KafkaV2Mq) Consume(name string, hand interface{}, ci int) {
|
||||||
go func() {
|
go func() {
|
||||||
for {
|
for {
|
||||||
if atomic.LoadInt32(tcppool.TcpFactory.Full) == 1 {
|
if atomic.LoadInt32(tcppool.TcpFactory.Full) == 1 {
|
||||||
utils.Log(nil, "对列阻塞")
|
//utils.Log(nil, "对列阻塞")
|
||||||
time.Sleep(100 * time.Millisecond)
|
time.Sleep(100 * time.Millisecond)
|
||||||
continue
|
continue
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -9,7 +9,6 @@ import (
|
||||||
|
|
||||||
func Log(c *gin.Context, name string, msg ...interface{}) {
|
func Log(c *gin.Context, name string, msg ...interface{}) {
|
||||||
_, file, line, _ := runtime.Caller(1)
|
_, file, line, _ := runtime.Caller(1)
|
||||||
timeLayout := "2006-01-01 03:04:05" //转化所需模板
|
var datetime = time.Now().Format(time.DateTime)
|
||||||
var datetime = time.Unix(time.Now().Unix(), 0).Format(timeLayout)
|
|
||||||
fmt.Println(name, msg, file, line, datetime)
|
fmt.Println(name, msg, file, line, datetime)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue