fix(scripts): 修正日报发送标题及文本内容
- 将发送图文消息的标题由“ETF轮动策略日报”改为“ETF轮动策略调仓日报” - 调整发送图文消息中文本内容,去除默认提示 - 发送报告时不再传递固定摘要文本,改为传空字符串 - 修复了每日任务中报告发送的文本逻辑问题
This commit is contained in:
@@ -166,8 +166,8 @@ def send_report_to_dingtalk(chart_path: str, summary_text: str = "") -> bool:
|
|||||||
# 发送图文消息
|
# 发送图文消息
|
||||||
success = bot.send_image_via_oss(
|
success = bot.send_image_via_oss(
|
||||||
image_path=chart_path,
|
image_path=chart_path,
|
||||||
title=f"ETF轮动策略日报 ({today_str})",
|
title=f"ETF轮动策略调仓日报 ({today_str})",
|
||||||
text=summary_text or f"今日调仓信号已生成",
|
text=summary_text,
|
||||||
expire_days=7,
|
expire_days=7,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -233,7 +233,7 @@ def daily_task(config_path: str = "config/strategies/rotation.yaml"):
|
|||||||
# 3. 发送报告
|
# 3. 发送报告
|
||||||
if result.get("chart_path"):
|
if result.get("chart_path"):
|
||||||
send_report_to_dingtalk(
|
send_report_to_dingtalk(
|
||||||
chart_path=result["chart_path"], summary_text="今日ETF轮动策略调仓信号"
|
chart_path=result["chart_path"], summary_text=""
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
logger.warning("未找到报告图表")
|
logger.warning("未找到报告图表")
|
||||||
|
|||||||
Reference in New Issue
Block a user