perf: 上传到阿里云证书名称后缀增加毫秒时间戳

pull/330/head
xiaojunnuo 2025-02-20 11:13:46 +08:00
parent 5164116bde
commit 9f0ee219d0
2 changed files with 2 additions and 2 deletions

View File

@ -193,7 +193,7 @@ export abstract class AbstractTaskPlugin implements ITaskPlugin {
if (name == null) { if (name == null) {
name = "certd"; name = "certd";
} }
return name + "_" + dayjs().format("YYYYMMDDHHmmss"); return name + "_" + dayjs().format("YYYYMMDDHHmmssSSS");
} }
async onRequest(req: PluginRequestHandleReq<any>) { async onRequest(req: PluginRequestHandleReq<any>) {

View File

@ -87,7 +87,7 @@ export class DeployCertToAliyunCDN extends AbstractTaskPlugin {
let certId: any = this.cert; let certId: any = this.cert;
if (typeof this.cert === 'object') { if (typeof this.cert === 'object') {
certId = await sslClient.uploadCert({ certId = await sslClient.uploadCert({
name: this.appendTimeSuffix('certd'), name: this.appendTimeSuffix(this.certName),
cert: this.cert, cert: this.cert,
}); });
} }