mirror of https://github.com/allinssl/allinssl
修改lecdn参数、增加腾讯云部署未创建任务的判断
parent
542262dfef
commit
64d29d2979
|
@ -238,9 +238,9 @@ func DeployLeCDN(cfg map[string]any) error {
|
|||
default:
|
||||
return fmt.Errorf("参数错误:provider_id")
|
||||
}
|
||||
domainName, ok := cfg["domain_name"].(string)
|
||||
domainName, ok := cfg["domain"].(string)
|
||||
if !ok || domainName == "" {
|
||||
return fmt.Errorf("参数错误:domain_name")
|
||||
return fmt.Errorf("参数错误:domain")
|
||||
}
|
||||
var siteId int
|
||||
switch v := cfg["site_id"].(type) {
|
||||
|
|
|
@ -135,9 +135,17 @@ func DeployToTX(cfg map[string]any) error {
|
|||
return err
|
||||
}
|
||||
if err != nil {
|
||||
panic(err)
|
||||
if _, ok := err.(*errors.TencentCloudSDKError); ok {
|
||||
return fmt.Errorf("腾讯云 API 错误: %v", err)
|
||||
}
|
||||
return fmt.Errorf("部署证书失败: %v", err)
|
||||
}
|
||||
if response == nil || response.Response == nil {
|
||||
return fmt.Errorf("部署证书失败: 响应为空")
|
||||
}
|
||||
if *response.Response.DeployStatus != 1 {
|
||||
return fmt.Errorf("腾讯云当前存在部署中的任务,未创建新的部署任务,部署中的任务ID为:%d", *response.Response.DeployRecordId)
|
||||
}
|
||||
fmt.Println(response.Response.DeployRecordId)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue