mirror of
https://github.com/certd/certd.git
synced 2026-04-30 01:07:28 +08:00
fix: 修复站点监控定时器多次添加的bug
This commit is contained in:
@@ -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());
|
||||||
|
|||||||
Reference in New Issue
Block a user