certificate display
This commit is contained in:
@@ -2,6 +2,7 @@ package nodeprocessor
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/usual2970/certimate/internal/applicant"
|
||||
@@ -95,7 +96,7 @@ func (a *applyNode) Run(ctx context.Context) error {
|
||||
}
|
||||
|
||||
certificateRecord := &domain.Certificate{
|
||||
SAN: cert.Subject.CommonName,
|
||||
SAN: strings.Join(cert.DNSNames, ";"),
|
||||
Certificate: certificate.Certificate,
|
||||
PrivateKey: certificate.PrivateKey,
|
||||
IssuerCertificate: certificate.IssuerCertificate,
|
||||
|
||||
@@ -33,7 +33,7 @@ func (w *workflowProcessor) runNode(ctx context.Context, node *domain.WorkflowNo
|
||||
if current.Type == domain.WorkflowNodeTypeBranch {
|
||||
for _, branch := range current.Branches {
|
||||
if err := w.runNode(ctx, &branch); err != nil {
|
||||
continue
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,11 +57,18 @@ func (s *WorkflowService) Run(ctx context.Context, req *domain.WorkflowRunReq) e
|
||||
}
|
||||
|
||||
// 保存执行日志
|
||||
|
||||
logs := processor.Log(ctx)
|
||||
runLogs := domain.RunLogs(logs)
|
||||
runErr := runLogs.Error()
|
||||
succeed := true
|
||||
if runErr != "" {
|
||||
succeed = false
|
||||
}
|
||||
log := &domain.WorkflowRunLog{
|
||||
Workflow: workflow.Id,
|
||||
Log: processor.Log(ctx),
|
||||
Succeed: true,
|
||||
Error: runErr,
|
||||
Succeed: succeed,
|
||||
}
|
||||
if err := s.repo.SaveRunLog(ctx, log); err != nil {
|
||||
app.GetApp().Logger().Error("failed to save run log", "err", err)
|
||||
|
||||
Reference in New Issue
Block a user