mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-01 07:35:58 +08:00
1.statistics log
2. Handle exception : etcd keepalive failed
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package statistics
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/log"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -14,13 +15,13 @@ type Statistics struct {
|
||||
func (s *Statistics) output() {
|
||||
t := time.NewTicker(time.Duration(s.SleepTime) * time.Second)
|
||||
defer t.Stop()
|
||||
//var sum uint64
|
||||
var sum uint64
|
||||
for {
|
||||
//sum = *s.Count
|
||||
sum = *s.Count
|
||||
select {
|
||||
case <-t.C:
|
||||
}
|
||||
//log.NewWarn("", " system stat ", s.ModuleName, s.PrintArgs, *s.Count-sum, "total:", *s.Count)
|
||||
log.NewWarn("", " system stat ", s.ModuleName, s.PrintArgs, *s.Count-sum, "total:", *s.Count)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user