diff --git a/lib/taskMoniter.mjs b/lib/taskMoniter.mjs index 6180ba0..29a94b5 100644 --- a/lib/taskMoniter.mjs +++ b/lib/taskMoniter.mjs @@ -18,7 +18,7 @@ import cron from 'node-cron'; class TaskMoniter { constructor(task_list_dir) { - this.check_time_gap = 10; //检测间隔时间,单位:秒 + this.check_time_gap = 30; //检测间隔时间,单位:秒 this.checking = false; this.task_dir = task_list_dir; //监控目录:任务列表保存目录 diff --git a/spider.mjs b/spider.mjs index b2c3e7e..5c476f5 100644 --- a/spider.mjs +++ b/spider.mjs @@ -74,6 +74,7 @@ import cron from 'node-cron'; spider_is_running = false; }else { console.error('No bot matched with url %s', task.url); + taskMoniter.setTaskRunning(task.id); taskMoniter.setTaskFailed(task.id); } }, {