mirror of
https://github.com/ngfchl/ptools
synced 2023-07-10 13:41:22 +08:00
修复通知服务的异常机制
This commit is contained in:
@@ -130,8 +130,8 @@ class PtSpider:
|
|||||||
res = '你还没有配置通知参数哦!'
|
res = '你还没有配置通知参数哦!'
|
||||||
if len(notifies) <= 0:
|
if len(notifies) <= 0:
|
||||||
return res
|
return res
|
||||||
try:
|
for notify in notifies:
|
||||||
for notify in notifies:
|
try:
|
||||||
if notify.name == PushConfig.wechat_work_push:
|
if notify.name == PushConfig.wechat_work_push:
|
||||||
"""企业微信通知"""
|
"""企业微信通知"""
|
||||||
notify_push = WechatPush(
|
notify_push = WechatPush(
|
||||||
@@ -185,9 +185,8 @@ class PtSpider:
|
|||||||
'desp': message
|
'desp': message
|
||||||
})
|
})
|
||||||
logger.info('爱语飞飞通知:{}'.format(res))
|
logger.info('爱语飞飞通知:{}'.format(res))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.info('通知发送失败,{} {}'.format(res, traceback.format_exc(limit=5)))
|
logger.info('通知发送失败,{} {}'.format(res, traceback.format_exc(limit=5)))
|
||||||
raise
|
|
||||||
|
|
||||||
def send_request(self,
|
def send_request(self,
|
||||||
my_site: MySite,
|
my_site: MySite,
|
||||||
|
|||||||
Reference in New Issue
Block a user