Skip to content

Commit

Permalink
✨ 优化通知配置
Browse files Browse the repository at this point in the history
- 使用深拷贝避免修改原始配置数据
- 默认启用控制台通知配置
  • Loading branch information
Cp0204 committed Dec 4, 2024
1 parent d6593e9 commit 5b2f11f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions telecom_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def send_notify(title, body):

# 如未配置 push_config 则使用青龙环境通知设置
if CONFIG_DATA.get("push_config"):
CONFIG_DATA["push_config"]["CONSOLE"] = True
notify.push_config = CONFIG_DATA["push_config"]
notify.push_config = CONFIG_DATA["push_config"].copy()
notify.push_config["CONSOLE"] = notify.push_config.get("CONSOLE", True)
notify.send(title, body)
except Exception as e:
if e:
Expand Down

0 comments on commit 5b2f11f

Please sign in to comment.