Commit 833f2a9b authored by hujiebin's avatar hujiebin

feat:优化告警

parent f8a02c60
......@@ -11,7 +11,6 @@ import (
"google.golang.org/grpc/resolver"
"google.golang.org/grpc/resolver/manual"
"hilo-socketCenter/common"
"hilo-socketCenter/common/dingding"
"hilo-socketCenter/common/mylogrus"
"hilo-socketCenter/common/redisCli"
"hilo-socketCenter/domain/model/rpc_m"
......@@ -113,11 +112,12 @@ func check() {
mylogrus.MyLog.Infof("cron sendGiftChan msg error,left %v-%v", l, err)
}
if l > MONITOR_LENGTH {
go func() {
if sErr := dingding.SendDingRobot(dingding.ROBOTWEBHOOK, fmt.Sprintf("送礼横幅变化通知延迟,队列%s长度:%d", SocketQueueSendGift, l), true); sErr != nil {
mylogrus.MyLog.Errorf("dingding msg fail:%v", sErr)
}
}()
mylogrus.MyLog.Infof("送礼横幅变化通知延迟,队列%s长度:%d", SocketQueueSendGift, l)
//go func() {
// if sErr := dingding.SendDingRobot(dingding.ROBOTWEBHOOK, fmt.Sprintf("送礼横幅变化通知延迟,队列%s长度:%d", SocketQueueSendGift, l), true); sErr != nil {
// mylogrus.MyLog.Errorf("dingding msg fail:%v", sErr)
// }
//}()
n, err := redisCli.GetRedisCluster().Del(context.Background(), SocketQueueSendGift).Result()
mylogrus.MyLog.Infof("del sendGiftChan msg queue:%v,n:%v,err:%v", SocketQueueSendGift, n, err)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment