From a89b918f98ee58c64bccf33294a199088c060569 Mon Sep 17 00:00:00 2001 From: jasonqiao36 Date: Sun, 8 Sep 2019 18:46:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20server=E9=85=B1=E9=80=9A?= =?UTF-8?q?=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- UnitTest/TestAll.py | 3 +-- inter/GetQueueCount.py | 2 ++ inter/QueryOrderWaitTime.py | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/UnitTest/TestAll.py b/UnitTest/TestAll.py index 05134f2..beef095 100644 --- a/UnitTest/TestAll.py +++ b/UnitTest/TestAll.py @@ -7,6 +7,7 @@ import requests from agency.agency_tools import proxy from config.emailConf import sendEmail from config.pushbearConf import sendPushBear +from config.serverchanConf import sendServerChan def _set_header_default(): @@ -58,8 +59,6 @@ class testAll(unittest.TestCase): 实测server酱是否可用 :return: """ - from config.serverchanConf import sendServerChan - sendServerChan(u"server酱 微信通知测试一下") diff --git a/inter/GetQueueCount.py b/inter/GetQueueCount.py index f878347..3e7535a 100644 --- a/inter/GetQueueCount.py +++ b/inter/GetQueueCount.py @@ -9,6 +9,7 @@ import TickerConfig from config.TicketEnmu import ticket from config.emailConf import sendEmail from config.pushbearConf import sendPushBear +from config.serverchanConf import sendServerChan from config.urlConf import urls from inter.ConfirmSingleForQueue import confirmSingleForQueue from myException.ticketIsExitsException import ticketIsExitsException @@ -130,6 +131,7 @@ class queryQueueByAfterNate: else: sendEmail(ticket.WAIT_ORDER_SUCCESS) sendPushBear(ticket.WAIT_ORDER_SUCCESS) + sendServerChan(ticket.WAIT_ORDER_SUCCESS) raise ticketIsExitsException(ticket.WAIT_AFTER_NATE_SUCCESS) diff --git a/inter/QueryOrderWaitTime.py b/inter/QueryOrderWaitTime.py index 2e457ac..a9131f2 100644 --- a/inter/QueryOrderWaitTime.py +++ b/inter/QueryOrderWaitTime.py @@ -5,6 +5,7 @@ import time from config.TicketEnmu import ticket from config.emailConf import sendEmail from config.pushbearConf import sendPushBear +from config.serverchanConf import sendServerChan from myException.ticketIsExitsException import ticketIsExitsException from myException.ticketNumOutException import ticketNumOutException @@ -45,6 +46,8 @@ class queryOrderWaitTime: data.get("orderId", ""))) sendPushBear(ticket.WAIT_ORDER_SUCCESS.format( data.get("orderId", ""))) + sendServerChan(ticket.WAIT_ORDER_SUCCESS.format( + data.get("orderId", ""))) raise ticketIsExitsException(ticket.WAIT_ORDER_SUCCESS.format( data.get("orderId"))) elif data.get("msg", False):