Skip to content

Commit

Permalink
feat: 渲染成功判断
Browse files Browse the repository at this point in the history
  • Loading branch information
yearnfar committed Sep 10, 2020
1 parent 3a306c6 commit 28e14c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/gexrender/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
gonanoid "github.com/matoous/go-nanoid"
log "github.com/sirupsen/logrus"
"github.com/yearnfar/gexrender/internal/gexrender/assets"
"github.com/yearnfar/gexrender/internal/pkg/util"
)

// Job 任务
Expand Down Expand Up @@ -243,7 +244,7 @@ func (j *Job) Render() (err error) {
}

// 渲染成功
if strings.Contains(outputStr, "Finished composition") {
if strings.Contains(outputStr, "Finished composition") || util.IsFile(j.Output) {
timeMatches := renderTimeRegex.FindStringSubmatch(outputStr)
if len(timeMatches) == 2 {
log.Infof(`[%s] rendering took ~%s sec.`, j.Uid, timeMatches[1])
Expand Down

0 comments on commit 28e14c4

Please sign in to comment.