mirror of
https://github.com/ngfchl/ptools
synced 2023-07-10 13:41:22 +08:00
优化自动更新任务消息推送格式
This commit is contained in:
@@ -279,7 +279,7 @@ def auto_upgrade():
|
||||
logger.info('同步数据库 命令执行结果:\n{}'.format(p))
|
||||
|
||||
logger.info('更新完毕')
|
||||
pt_spider.send_text('更新完成!')
|
||||
pt_spider.send_text(f'> 更新完成!{datetime.datetime.now()}')
|
||||
return CommonResponse.success(
|
||||
msg='更新成功,15S后自动刷新页面!',
|
||||
data={
|
||||
@@ -290,7 +290,7 @@ def auto_upgrade():
|
||||
# raise
|
||||
msg = '更新失败!{},请初始化Xpath!'.format(str(e))
|
||||
logger.error(msg)
|
||||
pt_spider.send_text(msg)
|
||||
pt_spider.send_text(f'> <font color="red">{msg}</font>')
|
||||
return CommonResponse.error(
|
||||
msg=msg
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user