mirror of
https://github.com/certd/certd.git
synced 2026-04-23 11:37:23 +08:00
perf: 优化证书未过期时的任务日志提示
This commit is contained in:
@@ -124,6 +124,7 @@ export abstract class CertApplyBasePlugin extends CertApplyBaseConvertPlugin {
|
||||
const ret = this.isWillExpire(oldCert, this.renewDays);
|
||||
if (!ret.isWillExpire) {
|
||||
this.logger.info(`证书还未过期:过期时间${dayjs(oldCert.expires).format("YYYY-MM-DD HH:mm:ss")},剩余${ret.leftDays}天`);
|
||||
this.logger.info(`证书将在${ret.nextUpdateDays}天后更新(再次运行本任务时)`);
|
||||
return oldCert;
|
||||
}
|
||||
this.logger.info("即将过期,开始更新证书");
|
||||
@@ -159,6 +160,7 @@ export abstract class CertApplyBasePlugin extends CertApplyBaseConvertPlugin {
|
||||
return {
|
||||
isWillExpire: leftDays <= maxDays,
|
||||
leftDays,
|
||||
nextUpdateDays: leftDays - maxDays,
|
||||
};
|
||||
}
|
||||
async sendSuccessNotify() {
|
||||
|
||||
Reference in New Issue
Block a user