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

This commit is contained in:
xiaojunnuo
2025-06-09 11:14:45 +08:00
parent 7f6070c960
commit 936167972f

View File

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