Skip to content

Commit

Permalink
IWF-208: Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
lwolczynski committed Oct 23, 2024
1 parent d09bce8 commit 13668fb
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions service/interpreter/stateExecutionCounter.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ func (e *StateExecutionCounter) MarkStateIdExecutingIfNotYet(stateReqs []StateRe
currentSAs, ok := sas[service.SearchAttributeExecutingStateIds]
if ok {
currentSAsValues = currentSAs.StringArrayValue
} else {
e.provider.GetLogger(e.ctx).Error("search attribute IwfExecutingStateIds is not found", err)
}

var executingStateIds []string
Expand Down Expand Up @@ -176,8 +174,8 @@ func (e *StateExecutionCounter) MarkStateExecutionCompleted(currentState iwfidl.
return nil
} else {
e.decreaseStateIdCurrentlyExecutingCounts(currentState)
shouldSkipUpsert := determineIfShouldSkipRefreshOnCompleted(nextStates, false)
if shouldSkipUpsert {
shouldSkipRefresh := determineIfShouldSkipRefreshOnCompleted(nextStates, false)
if shouldSkipRefresh {
return nil
}
}
Expand Down Expand Up @@ -207,7 +205,8 @@ func determineIfShouldSkipRefreshOnCompleted(nextStates []iwfidl.StateMovement,
}
} else {
for _, s := range nonClosingNextStates {
if !s.StateOptions.GetSkipWaitUntil() {
options := s.GetStateOptions()
if !compatibility.GetSkipWaitUntilApi(&options) {
return true
}
}
Expand Down

0 comments on commit 13668fb

Please sign in to comment.