mirror of
https://github.com/certd/certd.git
synced 2026-06-10 10:37:34 +08:00
fix(monitor): 修复开放接口自动创建证书流水线重复触发和等待时间不足的问题
1. 新增判断流水线状态为start时也跳过自动触发 2. 将等待时间从1秒调整为2秒,确保流水线能正常启动
This commit is contained in:
@@ -154,9 +154,9 @@ export class CertInfoFacade {
|
||||
async triggerApplyPipeline(req: { pipelineId: number }) {
|
||||
//查询流水线状态
|
||||
const status = await this.pipelineService.getStatus(req.pipelineId);
|
||||
if (status != "running") {
|
||||
if (status != "running" && status != "start") {
|
||||
await this.pipelineService.trigger(req.pipelineId);
|
||||
await utils.sleep(1000);
|
||||
await utils.sleep(2000);
|
||||
}
|
||||
const certInfo = await this.certInfoService.getByPipelineId(req.pipelineId);
|
||||
throw new CodeException({
|
||||
|
||||
Reference in New Issue
Block a user