feat: enhance context cancellation handling

This commit is contained in:
Fu Diwei
2025-04-23 19:32:21 +08:00
parent a90b6a8589
commit 97f102533c
31 changed files with 287 additions and 57 deletions

View File

@@ -126,8 +126,10 @@ func (d *DeployerProvider) Deploy(ctx context.Context, certPEM string, privkeyPE
// 循环获取部署任务详情,等待任务状态变更
// REF: https://help.aliyun.com/zh/ssl-certificate/developer-reference/api-cas-2020-04-07-describedeploymentjob
for {
if ctx.Err() != nil {
select {
case <-ctx.Done():
return nil, ctx.Err()
default:
}
describeDeploymentJobReq := &alicas.DescribeDeploymentJobRequest{