From e4665a16c8fd3f958a0063a3dd5dcbf2b68099d3 Mon Sep 17 00:00:00 2001 From: MartialBE Date: Mon, 3 Jun 2024 23:36:16 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20channel=20test=20error=20?= =?UTF-8?q?(#205)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/channel-test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/controller/channel-test.go b/controller/channel-test.go index 47d17b6b..7358067b 100644 --- a/controller/channel-test.go +++ b/controller/channel-test.go @@ -183,8 +183,9 @@ func testAllChannels(isNotify bool) error { } else { // 如果通道启用状态,但是返回了错误 或者 响应时间超过阈值,需要判断是否需要禁用 if milliseconds > disableThreshold { - sendMessage += fmt.Sprintf("- 响应时间 %.2fs 超过阈值 %.2fs \n\n- 禁用\n\n", float64(milliseconds)/1000.0, float64(disableThreshold)/1000.0) - DisableChannel(channel.Id, channel.Name, err.Error(), false) + errMsg := fmt.Sprintf("响应时间 %.2fs 超过阈值 %.2fs ", float64(milliseconds)/1000.0, float64(disableThreshold)/1000.0) + sendMessage += fmt.Sprintf("- %s \n\n- 禁用\n\n", errMsg) + DisableChannel(channel.Id, channel.Name, errMsg, false) continue }