mirror of
https://github.com/ZhuLinsen/daily_stock_analysis
synced 2026-09-20 10:53:33 +08:00
fix: count DingTalk webhook as notification channel (#2230)
This commit is contained in:
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
|
||||
|
||||
<!-- 新条目格式:- [类型] 描述(类型取值:新功能/改进/修复/文档/测试/chore)-->
|
||||
<!-- 每条独立一行追加到本段末尾,无需分类标题,合并时冲突最小 -->
|
||||
- [修复] 已配置钉钉 Webhook 时不再误报“未配置通知渠道”;钉钉 Stream 仍仅用于交互,不作为定时静态推送渠道。
|
||||
- [改进] AIHubMix 注册与引流链接统一使用 inferera.com,改善中国大陆网络直连体验。
|
||||
- [修复] 单股推送模式在未配置通知渠道时仍会落盘本地个股报告;CLI 启动分析若因空股票列表、个股结果全失败或本地报告保存失败而未生成报告,会显式返回失败并记录原因。
|
||||
- [修复] 合并推送模式下即使个股汇总报告落盘失败,仍会先发送已有的合并通知;仅启用大盘复盘但最终未生成任何复盘内容时,分析任务会显式返回失败。
|
||||
|
||||
@@ -3423,6 +3423,7 @@ class Config:
|
||||
# --- Notification channels ---
|
||||
has_notification = bool(
|
||||
self.wechat_webhook_url
|
||||
or self.dingtalk_webhook_url
|
||||
or self.feishu_webhook_url
|
||||
or (
|
||||
(self.feishu_app_id or "")
|
||||
|
||||
@@ -520,6 +520,15 @@ class TestValidateStructuredNotification:
|
||||
issues = cfg.validate_structured()
|
||||
assert not any(i.severity == "warning" and "通知渠道" in i.message for i in issues)
|
||||
|
||||
def test_dingtalk_webhook_counts_as_notification_channel(self):
|
||||
cfg = _make_config(
|
||||
wechat_webhook_url=None,
|
||||
dingtalk_webhook_url="https://oapi.dingtalk.com/robot/send?access_token=test",
|
||||
)
|
||||
issues = cfg.validate_structured()
|
||||
|
||||
assert not any(i.severity == "warning" and "通知渠道" in i.message for i in issues)
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("kwargs", "missing_field"),
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user