fix: 处理获取远程设置时出错的情况

This commit is contained in:
shanmite 2021-02-09 15:20:07 +08:00
parent 30f98140ed
commit d50f7051e9
4 changed files with 6 additions and 5 deletions

View File

@ -11,7 +11,7 @@ on:
branches:
- main
schedule:
- cron: '0 */2 * * *'
- cron: '0 */3 * * *'
env:
SCKEY: ${{ secrets.SCKEY }}
MY_CONFIG: ${{ secrets.MY_CONFIG }}

View File

@ -143,7 +143,7 @@ Chrome浏览器:
***以上步骤是为了检测是否配置成功***
至此程序将会每**小时运行**一次
至此程序将会每**小时运行**一次
↓↓

View File

@ -28,7 +28,7 @@ const { stringify } = require('querystring');
/**超时时间 */
const timeout = 20000;
/**超时尝试次数 */
let retry = 5;
let retry = 6;
/**
* @description 简化HTTP请求
* @param {RequestOptions} detail

View File

@ -131,8 +131,9 @@ class Monitor extends Public {
/* 判断是否转发过 */
const isRelay = (new RegExp(dyid)).test(self.AllMyLotteryInfo);
/* 获取黑名单并去重合并 */
const remoteconfig = GlobalVar.remoteconfig
const new_blacklist = blacklist.length === 0 ? remoteconfig["blacklist"] : Array.from(new Set([...blacklist.split(','), ...remoteconfig["blacklist"].split(',')])).toString();
const { blacklist: remote_blacklist } = GlobalVar.remoteconfig;
const new_blacklist = remote_blacklist ?
Array.from(new Set([...blacklist.split(','), ...remote_blacklist.split(',')])).toString() : blacklist;
/* 进行判断 */
if ((new RegExp(dyid + '|' + uid)).test(new_blacklist)) continue;
onelotteryinfo.uid = [] /**初始化待关注列表 */