diff --git a/scripts/ci/runner_monitor/alert_manager.py b/scripts/ci/runner_monitor/alert_manager.py old mode 100755 new mode 100644 index 028df9823..e0f3b119e --- a/scripts/ci/runner_monitor/alert_manager.py +++ b/scripts/ci/runner_monitor/alert_manager.py @@ -39,8 +39,8 @@ if _CI_DIR not in sys.path: sys.path.insert(0, _CI_DIR) from runner_monitor import config # noqa: E402 -from runner_monitor.runner_status import RunnerStatusChecker # noqa: E402 from runner_monitor.runner_metrics import RunnerMetricsCollector # noqa: E402 +from runner_monitor.runner_status import RunnerStatusChecker # noqa: E402 class Alert: @@ -275,11 +275,11 @@ class AlertManager: return 0 # 延迟导入 - from chatops.feishu_notify import FeishuNotifier # noqa: F401 - # 直接用 urllib 发,走同一个 webhook import urllib.request + from chatops.feishu_notify import FeishuNotifier # noqa: F401 + webhook_url = config.__dict__.get("FEISHU_WEBHOOK_URL", "") if not webhook_url: # 从 chatops config 拿