Skip to content

Commit ef60bc4

Browse files
committed
review comment to check wfr terminal status
1 parent 1cd425d commit ef60bc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/eventProcessor/in/WorkflowEventProcessorService.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ func (impl *WorkflowEventProcessorImpl) SubscribeCDStageCompleteEvent() error {
170170
return
171171
}
172172
wfr.IsArtifactUploaded = cdStageCompleteEvent.IsArtifactUploaded
173-
if wfr.Status != string(v1alpha1.NodeSucceeded) && wfr.Status != string(v1alpha1.NodeFailed) {
173+
if slices.Contains(cdWorkflowModelBean.WfrTerminalStatusList, wfr.Status) {
174174
impl.logger.Debugw("event received from ci runner, updating workflow runner status as succeeded", "savedWorkflowRunnerId", wfr.Id, "oldStatus", wfr.Status, "podStatus", wfr.PodStatus)
175175
if cdStageCompleteEvent.IsSuccess {
176176
wfr.Status = string(v1alpha1.NodeSucceeded)

0 commit comments

Comments
 (0)