mirror of
https://github.com/certd/certd.git
synced 2026-04-27 23:37:29 +08:00
perf: 优化zerossl申请证书稳定性
This commit is contained in:
@@ -600,7 +600,7 @@ class AcmeClient {
|
|||||||
throw new Error(`[${d}] Unexpected item status: ${resp.data.status}`);
|
throw new Error(`[${d}] Unexpected item status: ${resp.data.status}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.log(`[${d}] Waiting for valid status (等待valid状态): ${item.url}`, this.backoffOpts);
|
this.log(`[${d}] Waiting for valid status (等待valid状态): ${item.url}`, JSON.stringify(this.backoffOpts));
|
||||||
return util.retry(verifyFn, this.backoffOpts);
|
return util.retry(verifyFn, this.backoffOpts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -113,6 +113,9 @@ export class PipelineService extends BaseService<PipelineEntity> {
|
|||||||
|
|
||||||
async add(bean: PipelineEntity) {
|
async add(bean: PipelineEntity) {
|
||||||
bean.status = ResultType.none;
|
bean.status = ResultType.none;
|
||||||
|
if (bean.order == null) {
|
||||||
|
bean.order = 0;
|
||||||
|
}
|
||||||
await this.save(bean);
|
await this.save(bean);
|
||||||
return bean;
|
return bean;
|
||||||
}
|
}
|
||||||
@@ -243,6 +246,9 @@ export class PipelineService extends BaseService<PipelineEntity> {
|
|||||||
if (!bean.status) {
|
if (!bean.status) {
|
||||||
bean.status = ResultType.none;
|
bean.status = ResultType.none;
|
||||||
}
|
}
|
||||||
|
if (bean.order == null) {
|
||||||
|
bean.order = 0;
|
||||||
|
}
|
||||||
if (!isUpdate) {
|
if (!isUpdate) {
|
||||||
//如果是添加,先保存一下,获取到id,更新pipeline.id
|
//如果是添加,先保存一下,获取到id,更新pipeline.id
|
||||||
await this.addOrUpdate(bean);
|
await this.addOrUpdate(bean);
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ export class AcmeService {
|
|||||||
externalAccountBinding: this.eab,
|
externalAccountBinding: this.eab,
|
||||||
backoffAttempts: this.options.maxCheckRetryCount || 20,
|
backoffAttempts: this.options.maxCheckRetryCount || 20,
|
||||||
backoffMin: 5000,
|
backoffMin: 5000,
|
||||||
backoffMax: 10000,
|
backoffMax: 400000,
|
||||||
urlMapping,
|
urlMapping,
|
||||||
signal: this.options.signal,
|
signal: this.options.signal,
|
||||||
logger: this.logger,
|
logger: this.logger,
|
||||||
|
|||||||
Reference in New Issue
Block a user