修改 key 参数规则
This commit is contained in:
@@ -52,11 +52,14 @@ DINGTALK_WEBHOOK = 'https://oapi.dingtalk.com/robot/send?access_token=your token
|
|||||||
TELEGRAM_ENABLED = 0
|
TELEGRAM_ENABLED = 0
|
||||||
TELEGRAM_BOT_API_URL = 'https://tgbot.lbyczf.com/sendMessage/:your_token'
|
TELEGRAM_BOT_API_URL = 'https://tgbot.lbyczf.com/sendMessage/:your_token'
|
||||||
|
|
||||||
# ServerChan和PushBear配置
|
# ServerChan 和 PushBear 微信消息推送
|
||||||
|
# 使用说明
|
||||||
|
# ServerChan http://sc.ftqq.com
|
||||||
|
# PushBear http://pushbear.ftqq.com
|
||||||
SERVERCHAN_ENABLED = 0
|
SERVERCHAN_ENABLED = 0
|
||||||
S_KEY = 'SCUdafadsfasfdafdf45234234234'
|
SERVERCHAN_KEY = ''
|
||||||
PUSHBEAR_ENABLED = 0
|
PUSHBEAR_ENABLED = 0
|
||||||
SC_KEY = '8474-ca071ADSFADSF'
|
PUSHBEAR_KEY = ''
|
||||||
|
|
||||||
# 输出日志到文件 (Docker 中不建议修改此组配置项)
|
# 输出日志到文件 (Docker 中不建议修改此组配置项)
|
||||||
OUT_PUT_LOG_TO_FILE_ENABLED = 1
|
OUT_PUT_LOG_TO_FILE_ENABLED = 1
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ NOTIFICATION_API_APP_CODE = 'your app code'
|
|||||||
NOTIFICATION_VOICE_CODE_PHONE = 'your phone' # 接受通知的手机号
|
NOTIFICATION_VOICE_CODE_PHONE = 'your phone' # 接受通知的手机号
|
||||||
|
|
||||||
# 钉钉通知
|
# 钉钉通知
|
||||||
|
# 使用说明 https://open-doc.dingtalk.com/docs/doc.htm?treeId=257&articleId=105735&docType=1
|
||||||
DINGTALK_ENABLED = 0
|
DINGTALK_ENABLED = 0
|
||||||
DINGTALK_WEBHOOK = 'https://oapi.dingtalk.com/robot/send?access_token=your token'
|
DINGTALK_WEBHOOK = 'https://oapi.dingtalk.com/robot/send?access_token=your token'
|
||||||
|
|
||||||
@@ -52,11 +53,14 @@ DINGTALK_WEBHOOK = 'https://oapi.dingtalk.com/robot/send?access_token=your token
|
|||||||
TELEGRAM_ENABLED = 0
|
TELEGRAM_ENABLED = 0
|
||||||
TELEGRAM_BOT_API_URL = 'https://tgbot.lbyczf.com/sendMessage/:your_token'
|
TELEGRAM_BOT_API_URL = 'https://tgbot.lbyczf.com/sendMessage/:your_token'
|
||||||
|
|
||||||
# ServerChan和PushBear配置
|
# ServerChan 和 PushBear 微信消息推送
|
||||||
|
# 使用说明
|
||||||
|
# ServerChan http://sc.ftqq.com
|
||||||
|
# PushBear http://pushbear.ftqq.com
|
||||||
SERVERCHAN_ENABLED = 0
|
SERVERCHAN_ENABLED = 0
|
||||||
S_KEY = 'SCUdafadsfasfdafdf45234234234'
|
SERVERCHAN_KEY = ''
|
||||||
PUSHBEAR_ENABLED = 0
|
PUSHBEAR_ENABLED = 0
|
||||||
SC_KEY = '8474-ca071ADSFADSF'
|
PUSHBEAR_KEY = ''
|
||||||
|
|
||||||
# 输出日志到文件
|
# 输出日志到文件
|
||||||
OUT_PUT_LOG_TO_FILE_ENABLED = 0
|
OUT_PUT_LOG_TO_FILE_ENABLED = 0
|
||||||
|
|||||||
@@ -119,11 +119,11 @@ class App:
|
|||||||
|
|
||||||
if Config().SERVERCHAN_ENABLED: # ServerChan通知
|
if Config().SERVERCHAN_ENABLED: # ServerChan通知
|
||||||
CommonLog.add_quick_log(CommonLog.MESSAGE_TEST_SEND_SERVER_CHAN).flush()
|
CommonLog.add_quick_log(CommonLog.MESSAGE_TEST_SEND_SERVER_CHAN).flush()
|
||||||
Notification.server_chan(Config().S_KEY, '测试发送消息', 'By py12306')
|
Notification.server_chan(Config().SERVERCHAN_KEY, '测试发送消息', 'By py12306')
|
||||||
|
|
||||||
if Config().PUSHBEAR_ENABLED: # PushBear通知
|
if Config().PUSHBEAR_ENABLED: # PushBear通知
|
||||||
CommonLog.add_quick_log(CommonLog.MESSAGE_TEST_SEND_PUSH_BEAR).flush()
|
CommonLog.add_quick_log(CommonLog.MESSAGE_TEST_SEND_PUSH_BEAR).flush()
|
||||||
Notification.push_bear(Config().SC_KEY, '测试发送消息', 'By py12306')
|
Notification.push_bear(Config().PUSHBEAR_KEY, '测试发送消息', 'By py12306')
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run_check(cls):
|
def run_check(cls):
|
||||||
|
|||||||
@@ -64,9 +64,9 @@ class Config:
|
|||||||
|
|
||||||
# ServerChan和PushBear配置
|
# ServerChan和PushBear配置
|
||||||
SERVERCHAN_ENABLED = 0
|
SERVERCHAN_ENABLED = 0
|
||||||
S_KEY = ''
|
SERVERCHAN_KEY = '8474-ca071ADSFADSF'
|
||||||
PUSHBEAR_ENABLED = 0
|
PUSHBEAR_ENABLED = 0
|
||||||
SC_KEY = ''
|
PUSHBEAR_KEY = 'SCUdafadsfasfdafdf45234234234'
|
||||||
|
|
||||||
# 邮箱配置
|
# 邮箱配置
|
||||||
EMAIL_ENABLED = 0
|
EMAIL_ENABLED = 0
|
||||||
|
|||||||
@@ -88,10 +88,10 @@ class Order:
|
|||||||
Notification.send_to_telegram(
|
Notification.send_to_telegram(
|
||||||
OrderLog.MESSAGE_ORDER_SUCCESS_NOTIFICATION_OF_EMAIL_CONTENT.format(self.order_id))
|
OrderLog.MESSAGE_ORDER_SUCCESS_NOTIFICATION_OF_EMAIL_CONTENT.format(self.order_id))
|
||||||
if Config().SERVERCHAN_ENABLED: # ServerChan通知
|
if Config().SERVERCHAN_ENABLED: # ServerChan通知
|
||||||
Notification.server_chan(Config().S_KEY, OrderLog.MESSAGE_ORDER_SUCCESS_NOTIFICATION_TITLE,
|
Notification.server_chan(Config().SERVERCHAN_KEY, OrderLog.MESSAGE_ORDER_SUCCESS_NOTIFICATION_TITLE,
|
||||||
OrderLog.MESSAGE_ORDER_SUCCESS_NOTIFICATION_OF_EMAIL_CONTENT.format(self.order_id))
|
OrderLog.MESSAGE_ORDER_SUCCESS_NOTIFICATION_OF_EMAIL_CONTENT.format(self.order_id))
|
||||||
if Config().PUSHBEAR_ENABLED: # PushBear通知
|
if Config().PUSHBEAR_ENABLED: # PushBear通知
|
||||||
Notification.push_bear(Config().SC_KEY, OrderLog.MESSAGE_ORDER_SUCCESS_NOTIFICATION_TITLE,
|
Notification.push_bear(Config().PUSHBEAR_KEY, OrderLog.MESSAGE_ORDER_SUCCESS_NOTIFICATION_TITLE,
|
||||||
OrderLog.MESSAGE_ORDER_SUCCESS_NOTIFICATION_OF_EMAIL_CONTENT.format(self.order_id))
|
OrderLog.MESSAGE_ORDER_SUCCESS_NOTIFICATION_OF_EMAIL_CONTENT.format(self.order_id))
|
||||||
while sustain_time: # TODO 后面直接查询有没有待支付的订单就可以
|
while sustain_time: # TODO 后面直接查询有没有待支付的订单就可以
|
||||||
num += 1
|
num += 1
|
||||||
|
|||||||
Reference in New Issue
Block a user