feat: restrict automatic channel testing to master node only

This commit is contained in:
CaIon
2025-11-06 21:12:59 +08:00
parent 019412c27a
commit 3dc4d6c39e

View File

@@ -617,6 +617,10 @@ func TestAllChannels(c *gin.Context) {
var autoTestChannelsOnce sync.Once
func AutomaticallyTestChannels() {
// 只在Master节点定时测试渠道
if !common.IsMasterNode {
return
}
autoTestChannelsOnce.Do(func() {
for {
if !operation_setting.GetMonitorSetting().AutoTestChannelEnabled {