From b023daa963ad047a3fcb87bc9f0cf548ee80a523 Mon Sep 17 00:00:00 2001 From: filesite Date: Sat, 13 Apr 2024 08:38:18 +0800 Subject: [PATCH] change herounion server url --- config.mjs | 4 ++-- lib/taskMoniter.mjs | 4 ++-- spider.mjs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config.mjs b/config.mjs index 7ac683d..3674833 100644 --- a/config.mjs +++ b/config.mjs @@ -6,7 +6,7 @@ export default { //HeroUnion英雄联盟对接配置 herounion: { - server_url: 'http://127.0.0.1:8080', //联盟服务地址 + server_url: 'https://herounion.filesite.io', //联盟服务地址 name: 'machete_hero', //爬虫名字 description: '支持Machete的TaJian皮肤的hero爬虫', //爬虫简介 platforms: 'douyin,kuaishou,xigua,bilibili', //爬虫支持的平台 @@ -56,4 +56,4 @@ export default { android_wechat: 'Mozilla/5.0 (Linux; Android 7.1.1; OD103 Build/NMF26F; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.49 Mobile MQQBrowser/6.2 TBS/043632 Safari/537.36 MicroMessenger/6.6.1.1220(0x26060135) NetType/4G Language/zh_CN', } -}; \ No newline at end of file +}; diff --git a/lib/taskMoniter.mjs b/lib/taskMoniter.mjs index bf158ca..f837a73 100644 --- a/lib/taskMoniter.mjs +++ b/lib/taskMoniter.mjs @@ -19,7 +19,7 @@ import HeroBot from "./heroBot.mjs"; class TaskMoniter { constructor(task_list_dir) { - this.check_time_gap = 30; //检测间隔时间,单位:秒 + this.check_time_gap = 60; //检测间隔时间,单位:秒 this.checking = false; this.task_dir = task_list_dir; //监控目录:任务列表保存目录 @@ -209,4 +209,4 @@ class TaskMoniter { } } -export default TaskMoniter; \ No newline at end of file +export default TaskMoniter; diff --git a/spider.mjs b/spider.mjs index c0598c8..5e299d8 100644 --- a/spider.mjs +++ b/spider.mjs @@ -101,7 +101,7 @@ import cron from 'node-cron'; ); //爬虫心跳上报 - const heartBeatFrequence = 60; //1 分钟上报一次 + const heartBeatFrequence = 300; //5 分钟上报一次 const heroUnionHeartBeat = cron.schedule(`*/${heartBeatFrequence} * * * * *`, async () => { let status = spider_is_running ? 'busy' : 'idle'; const res = await heroBot.heartBeat(status); @@ -112,4 +112,4 @@ import cron from 'node-cron'; })().catch(error => { console.error("Spider error got:\n%s", error); process.exit(1); -}); \ No newline at end of file +});