pull/351/head v2.3.2
wangchuxiao 2 years ago
parent 189d5aed69
commit 692cebe659

@ -42,6 +42,7 @@ func Init() {
w = new(sync.Mutex)
persistentCH.Init() // ws2mschat save mysql
historyCH.Init(cmdCh) //
historyMongoCH.Init()
onlineTopicStatus = OnlineTopicVacancy
//offlineHistoryCH.Init(cmdCh)
statistics.NewStatistics(&singleMsgSuccessCount, config.Config.ModuleName.MsgTransferName, fmt.Sprintf("%d second singleMsgCount insert to mongo", constant.StatisticsTimeInterval), constant.StatisticsTimeInterval)

@ -79,8 +79,9 @@ func (pc *PersistentConsumerHandler) handleChatWs2Mysql(cMsg *sarama.ConsumerMes
return
}
msgInsertMysqlProcessed.Inc()
msgInsertMysqlProcessed.Add(1)
if config.Config.Prometheus.Enable {
log.NewDebug(msgFromMQ.OperationID, utils.GetSelfFuncName(), "inc msgInsertMysqlProcessed")
log.NewDebug(msgFromMQ.OperationID, utils.GetSelfFuncName(), "inc msgInsertMysqlProcessed", msgInsertMysqlProcessed.Desc())
msgInsertMysqlProcessed.Inc()
}
}

Loading…
Cancel
Save