From d50f7051e922d6668d6dc8a9e2fcfd6c0aed227e Mon Sep 17 00:00:00 2001 From: shanmite <1971513084@qq.com> Date: Tue, 9 Feb 2021 15:20:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=84=E7=90=86=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E8=AE=BE=E7=BD=AE=E6=97=B6=E5=87=BA=E9=94=99?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/node.js.yml | 2 +- README.md | 2 +- lib/HttpRequest.js | 2 +- lib/Monitor.js | 5 +++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 158fdcd..92f175f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -11,7 +11,7 @@ on: branches: - main schedule: - - cron: '0 */2 * * *' + - cron: '0 */3 * * *' env: SCKEY: ${{ secrets.SCKEY }} MY_CONFIG: ${{ secrets.MY_CONFIG }} diff --git a/README.md b/README.md index 5f2682a..ec208ba 100644 --- a/README.md +++ b/README.md @@ -143,7 +143,7 @@ Chrome浏览器: ***以上步骤是为了检测是否配置成功*** -至此程序将会每**两小时运行**一次 +至此程序将会每**三小时运行**一次 ↓↓ diff --git a/lib/HttpRequest.js b/lib/HttpRequest.js index e2b320c..f0bca8f 100644 --- a/lib/HttpRequest.js +++ b/lib/HttpRequest.js @@ -28,7 +28,7 @@ const { stringify } = require('querystring'); /**超时时间 */ const timeout = 20000; /**超时尝试次数 */ -let retry = 5; +let retry = 6; /** * @description 简化HTTP请求 * @param {RequestOptions} detail diff --git a/lib/Monitor.js b/lib/Monitor.js index 4392c58..d18f5e7 100644 --- a/lib/Monitor.js +++ b/lib/Monitor.js @@ -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 = [] /**初始化待关注列表 */