feat: restrict automatic channel testing to master node only
This commit is contained in:
parent
c390734cef
commit
28295e0168
@ -617,6 +617,10 @@ func TestAllChannels(c *gin.Context) {
|
|||||||
var autoTestChannelsOnce sync.Once
|
var autoTestChannelsOnce sync.Once
|
||||||
|
|
||||||
func AutomaticallyTestChannels() {
|
func AutomaticallyTestChannels() {
|
||||||
|
// 只在Master节点定时测试渠道
|
||||||
|
if !common.IsMasterNode {
|
||||||
|
return
|
||||||
|
}
|
||||||
autoTestChannelsOnce.Do(func() {
|
autoTestChannelsOnce.Do(func() {
|
||||||
for {
|
for {
|
||||||
if !operation_setting.GetMonitorSetting().AutoTestChannelEnabled {
|
if !operation_setting.GetMonitorSetting().AutoTestChannelEnabled {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user