From dbe98ca867481c09238f798834ffb5b9f422d5a4 Mon Sep 17 00:00:00 2001 From: Echowxsy Date: Mon, 14 Jan 2019 20:15:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=92=89=E9=92=89=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- env.docker.py.example | 4 ++++ env.py.example | 4 ++++ py12306/config.py | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/env.docker.py.example b/env.docker.py.example index 3f206f8..37309f9 100644 --- a/env.docker.py.example +++ b/env.docker.py.example @@ -42,6 +42,10 @@ NOTIFICATION_BY_VOICE_CODE = 1 # 开启语音通知 NOTIFICATION_API_APP_CODE = 'your app code' NOTIFICATION_VOICE_CODE_PHONE = 'your phone' # 接受通知的手机号 +# 钉钉通知 +DINGTALK_ENABLED = 0 +DINGTALK_WEBHOOK = 'https://oapi.dingtalk.com/robot/send?access_token=your token' + # 输出日志到文件 (Docker 中不建议修改此组配置项) OUT_PUT_LOG_TO_FILE_ENABLED = 1 OUT_PUT_LOG_TO_FILE_PATH = '/config/12306.log' # 日志目录 diff --git a/env.py.example b/env.py.example index 56a1a76..8d66ddc 100644 --- a/env.py.example +++ b/env.py.example @@ -42,6 +42,10 @@ NOTIFICATION_BY_VOICE_CODE = 1 # 开启语音通知 NOTIFICATION_API_APP_CODE = 'your app code' NOTIFICATION_VOICE_CODE_PHONE = 'your phone' # 接受通知的手机号 +# 钉钉通知 +DINGTALK_ENABLED = 0 +DINGTALK_WEBHOOK = 'https://oapi.dingtalk.com/robot/send?access_token=your token' + # 输出日志到文件 OUT_PUT_LOG_TO_FILE_ENABLED = 0 OUT_PUT_LOG_TO_FILE_PATH = 'runtime/12306.log' # 日志目录 diff --git a/py12306/config.py b/py12306/config.py index 6fa0ff8..83e4836 100644 --- a/py12306/config.py +++ b/py12306/config.py @@ -54,6 +54,10 @@ class Config: REDIS_PORT = '6379' REDIS_PASSWORD = '' + # 钉钉配置 + DINGTALK_ENABLED = 0 + DINGTALK_WEBHOOK = '' + # 邮箱配置 EMAIL_ENABLED = 0 EMAIL_SENDER = ''