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