Browse Source

change herounion server url

master
filesite 8 months ago
parent
commit
b023daa963
  1. 2
      config.mjs
  2. 2
      lib/taskMoniter.mjs
  3. 2
      spider.mjs

2
config.mjs

@ -6,7 +6,7 @@ export default {
//HeroUnion英雄联盟对接配置 //HeroUnion英雄联盟对接配置
herounion: { herounion: {
server_url: 'http://127.0.0.1:8080', //联盟服务地址 server_url: 'https://herounion.filesite.io', //联盟服务地址
name: 'machete_hero', //爬虫名字 name: 'machete_hero', //爬虫名字
description: '支持Machete的TaJian皮肤的hero爬虫', //爬虫简介 description: '支持Machete的TaJian皮肤的hero爬虫', //爬虫简介
platforms: 'douyin,kuaishou,xigua,bilibili', //爬虫支持的平台 platforms: 'douyin,kuaishou,xigua,bilibili', //爬虫支持的平台

2
lib/taskMoniter.mjs

@ -19,7 +19,7 @@ import HeroBot from "./heroBot.mjs";
class TaskMoniter { class TaskMoniter {
constructor(task_list_dir) { constructor(task_list_dir) {
this.check_time_gap = 30; //检测间隔时间,单位:秒 this.check_time_gap = 60; //检测间隔时间,单位:秒
this.checking = false; this.checking = false;
this.task_dir = task_list_dir; //监控目录:任务列表保存目录 this.task_dir = task_list_dir; //监控目录:任务列表保存目录

2
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 () => { const heroUnionHeartBeat = cron.schedule(`*/${heartBeatFrequence} * * * * *`, async () => {
let status = spider_is_running ? 'busy' : 'idle'; let status = spider_is_running ? 'busy' : 'idle';
const res = await heroBot.heartBeat(status); const res = await heroBot.heartBeat(status);

Loading…
Cancel
Save