mirror of https://github.com/certd/certd
chore: 等待解析生效时长可自定义
parent
d35d9c17c5
commit
826be45b6a
|
@ -234,6 +234,7 @@ export default async (client, userOpts) => {
|
|||
throw new CancelError("用户取消");
|
||||
}
|
||||
|
||||
const waitDnsDiffuseTime = opts.waitDnsDiffuseTime || 30;
|
||||
try {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await runPromisePa(challengePromises);
|
||||
|
@ -242,8 +243,8 @@ export default async (client, userOpts) => {
|
|||
await wait(60 * 1000);
|
||||
} else {
|
||||
await runPromisePa(localVerifyTasks, 1000);
|
||||
log("本地校验完成,等待30s")
|
||||
await wait(30 * 1000)
|
||||
log(`本地校验完成,等待${waitDnsDiffuseTime}s`)
|
||||
await wait(waitDnsDiffuseTime * 1000)
|
||||
}
|
||||
|
||||
log("开始向提供商请求挑战验证");
|
||||
|
|
|
@ -63,6 +63,7 @@ type AcmeServiceOptions = {
|
|||
maxCheckRetryCount?: number;
|
||||
userId: number;
|
||||
domainParser: IDomainParser;
|
||||
waitDnsDiffuseTime?: number;
|
||||
};
|
||||
|
||||
export class AcmeService {
|
||||
|
|
|
@ -290,6 +290,17 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
|
|||
})
|
||||
maxCheckRetryCount = 20;
|
||||
|
||||
@TaskInput({
|
||||
title: "等待解析生效时长",
|
||||
value: 30,
|
||||
component: {
|
||||
name: "a-input-number",
|
||||
vModel: "value",
|
||||
},
|
||||
helper: "等待解析生效时长(秒)",
|
||||
})
|
||||
waitDnsDiffuseTime = 30;
|
||||
|
||||
acme!: AcmeService;
|
||||
|
||||
eab!: EabAccess;
|
||||
|
@ -341,6 +352,7 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
|
|||
signal: this.ctx.signal,
|
||||
maxCheckRetryCount: this.maxCheckRetryCount,
|
||||
domainParser,
|
||||
waitDnsDiffuseTime: this.waitDnsDiffuseTime,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue