Browse Source

send heart beat when bot start

master
filesite 8 months ago
parent
commit
3eb1154f5b
  1. 1
      spider.mjs

1
spider.mjs

@ -114,6 +114,7 @@ import cron from 'node-cron';
console.log('HeroUnion bot heart beat result', res); console.log('HeroUnion bot heart beat result', res);
}, {scheduled: false}); }, {scheduled: false});
heroUnionHeartBeat.start(); heroUnionHeartBeat.start();
heroBot.heartBeat('idle'); //马上上报一次
console.log('[%s] HeroUnion bot heart beat started.', common.getTimeString()); console.log('[%s] HeroUnion bot heart beat started.', common.getTimeString());
})().catch(error => { })().catch(error => {
console.error("Spider error got:\n%s", error); console.error("Spider error got:\n%s", error);

Loading…
Cancel
Save