Browse Source

improve logs

master
filesite-io 6 months ago
parent
commit
feb3249136
  1. 4
      monitor.mjs

4
monitor.mjs

@ -70,7 +70,6 @@ class Monitor { @@ -70,7 +70,6 @@ class Monitor {
const cronjob = cron.schedule(`*/${frequence} * * * *`, async () => {
let configs = await _self.getConfig();
if (configs.monit_urls.length == 0) {
console.error("No monit urls in the config file.");
return false;
}
@ -104,7 +103,7 @@ class Monitor { @@ -104,7 +103,7 @@ class Monitor {
task = _self.tasks[index];
if (task.status == 'done') {continue;}
console.log('Query task result of %s', task.id);
//console.log('Query task result of %s', task.id);
taskRes = await common.queryHeroUnionTask(task.id, configs);
if (taskRes && taskRes.code == 1) {
_self.tasks[index] = taskRes.task;
@ -138,7 +137,6 @@ class Monitor { @@ -138,7 +137,6 @@ class Monitor {
&& this.config.resultQueryFrequence ? this.config.resultQueryFrequence : 5; //5 分钟检测一次
const cronjob = cron.schedule(`*/${frequence} * * * *`, async () => {
if (_self.tasks.length == 0) {
console.error("No tasks to check result.");
return false;
}

Loading…
Cancel
Save