fix: 修复站点监控定时器多次添加的bug

pull/436/head
xiaojunnuo 2025-06-09 11:14:45 +08:00
parent 7f6070c960
commit 936167972f
1 changed files with 2 additions and 0 deletions

View File

@ -85,6 +85,8 @@ export class Cron {
} }
this.logger.info(`[cron] register cron : [${req.name}] ,${req.cron}`); this.logger.info(`[cron] register cron : [${req.name}] ,${req.cron}`);
this.remove(req.name)
const task = new CronTask(req, this.logger); const task = new CronTask(req, this.logger);
this.queue.push(task); this.queue.push(task);
this.logger.info('当前定时任务数量:', this.getTaskSize()); this.logger.info('当前定时任务数量:', this.getTaskSize());