mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 04:30:05 +00:00
refactor: remove pages, combine grpc http port
This commit is contained in:
@@ -156,16 +156,16 @@ func (s *NezhaHandler) ReportSystemInfo(c context.Context, r *pb.Host) (*pb.Rece
|
||||
host.IP != "" &&
|
||||
singleton.ServerList[clientID].Host.IP != host.IP {
|
||||
|
||||
singleton.SendNotification(singleton.Conf.IPChangeNotificationTag,
|
||||
fmt.Sprintf(
|
||||
"[%s] %s, %s => %s",
|
||||
// singleton.Localizer.MustLocalize(&i18n.LocalizeConfig{
|
||||
// MessageID: "IPChanged",
|
||||
// }),
|
||||
singleton.ServerList[clientID].Name, singleton.IPDesensitize(singleton.ServerList[clientID].Host.IP),
|
||||
singleton.IPDesensitize(host.IP),
|
||||
),
|
||||
nil)
|
||||
// singleton.SendNotification(singleton.Conf.IPChangeNotificationTag,
|
||||
// fmt.Sprintf(
|
||||
// "[%s] %s, %s => %s",
|
||||
// singleton.Localizer.MustLocalize(&i18n.LocalizeConfig{
|
||||
// MessageID: "IPChanged",
|
||||
// }),
|
||||
// singleton.ServerList[clientID].Name, singleton.IPDesensitize(singleton.ServerList[clientID].Host.IP),
|
||||
// singleton.IPDesensitize(host.IP),
|
||||
// ),
|
||||
// nil)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -350,9 +350,6 @@ func (ss *ServiceSentinel) worker() {
|
||||
ts.count++
|
||||
ts.ping = (ts.ping*float32(ts.count-1) + mh.Delay) / float32(ts.count)
|
||||
if ts.count == Conf.AvgPingCount {
|
||||
if ts.ping > float32(Conf.MaxTCPPingValue) {
|
||||
ts.ping = float32(Conf.MaxTCPPingValue)
|
||||
}
|
||||
ts.count = 0
|
||||
if err := DB.Create(&model.MonitorHistory{
|
||||
MonitorID: mh.GetId(),
|
||||
|
||||
Reference in New Issue
Block a user