From 5359a7670fac5a18c4294b37a34227308a0deed6 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Sat, 27 Dec 2025 15:05:43 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E9=98=BF=E9=87=8C?= =?UTF-8?q?=E4=BA=91esa=E6=B8=85=E7=90=86=E8=AF=81=E4=B9=A6=E6=97=B6?= =?UTF-8?q?=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/deploy-to-esa/index.ts | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/ui/certd-server/src/plugins/plugin-aliyun/plugin/deploy-to-esa/index.ts b/packages/ui/certd-server/src/plugins/plugin-aliyun/plugin/deploy-to-esa/index.ts index e7e6b037f..a589fe4ca 100644 --- a/packages/ui/certd-server/src/plugins/plugin-aliyun/plugin/deploy-to-esa/index.ts +++ b/packages/ui/certd-server/src/plugins/plugin-aliyun/plugin/deploy-to-esa/index.ts @@ -126,6 +126,12 @@ export class AliyunDeployCertToESA extends AbstractTaskPlugin { for (const siteId of this.siteIds) { + try{ + await this.clearSiteCert(client,siteId); + }catch (e) { + this.logger.error("清理站点[${siteId}]证书失败",e) + } + try { const res = await client.doRequest({ // 接口名称 @@ -149,13 +155,15 @@ export class AliyunDeployCertToESA extends AbstractTaskPlugin { }else{ throw e; } + }finally{ + try{ + await this.clearSiteCert(client,siteId); + }catch (e) { + this.logger.error("清理站点[${siteId}]证书失败",e) + } } - try{ - await this.clearSiteCert(client,siteId); - }catch (e) { - this.logger.error("清理站点[${siteId}]证书失败",e) - } + } }