Skip to content

Commit

Permalink
fix: fix suspend judgement
Browse files Browse the repository at this point in the history
Signed-off-by: FogDong <fog@bentoml.com>
  • Loading branch information
FogDong committed Sep 24, 2024
1 parent 76db4ac commit 3dd8afc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/tasks/custom/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (exec *executor) Terminate(message string) {
// Wait let workflow wait.
func (exec *executor) Wait(message string) {
exec.wait = true
if exec.wfStatus.Phase != v1alpha1.WorkflowStepPhaseFailed {
if exec.wfStatus.Phase != v1alpha1.WorkflowStepPhaseFailed && exec.wfStatus.Phase != v1alpha1.WorkflowStepPhaseSuspending {
exec.wfStatus.Phase = v1alpha1.WorkflowStepPhaseRunning
exec.wfStatus.Reason = types.StatusReasonWait
if message != "" {
Expand Down
4 changes: 4 additions & 0 deletions pkg/tasks/custom/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ func (t *TaskLoader) makeTaskGenerator(templ string) (types.TaskGenerator, error

if status, ok := options.StepStatus[wfStep.Name]; ok {
exec.stepStatus = status
exec.wfStatus = status
if status.Phase == v1alpha1.WorkflowStepPhaseSuspending {
exec.suspend = true
}
}
basicTempl, err := util.ToString(basicVal)
if err != nil {
Expand Down

0 comments on commit 3dd8afc

Please sign in to comment.