Skip to content

Commit

Permalink
worker/task handler: set action state to active
Browse files Browse the repository at this point in the history
This then allows the action state machine to begin work on the action.
  • Loading branch information
joelrebel committed May 8, 2023
1 parent 5880908 commit 05a21c0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/worker/task_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ func (h *taskHandler) Run(t sw.StateSwitch, args sw.TransitionArgs) error {

// fetch action attributes from task
action := task.ActionsPlanned.ByID(actionSM.ActionID())
if err := action.SetState(model.StateActive); err != nil {
return err
}

// run the action state machine
err := actionSM.Run(tctx.Ctx, action, tctx)
Expand Down

0 comments on commit 05a21c0

Please sign in to comment.