Skip to content

Commit

Permalink
Consider childjobs completed when they're not going to be started (#252)
Browse files Browse the repository at this point in the history
Co-authored-by: feedmeapples <aksenov.ro@outlook.com>
  • Loading branch information
sebneira and feedmeapples committed Jun 21, 2023
1 parent a936ed5 commit e40d2a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions trace/workflow_state_worker.go
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"

"github.com/alitto/pond"
"go.temporal.io/api/enums/v1"
"go.temporal.io/api/history/v1"
Expand Down Expand Up @@ -102,6 +103,9 @@ func (job *WorkflowStateJob) Run(group *pond.TaskGroupWithContext) func() error
for _, childJob := range job.childJobs {
if childJob.ShouldStart() {
group.Submit(childJob.Run(group))
} else {
// Consider the child job completed if it's not going to be started
childJob.state.LastEventId = childJob.state.HistoryLength
}
}
}
Expand Down

0 comments on commit e40d2a7

Please sign in to comment.