feat: move UpdateTaskByState to services
This function is also can't be in models in order to enable calling the action run state change notification channel.
This commit is contained in:
parent
81b5c7ca6f
commit
cdb4682bca
3 changed files with 92 additions and 93 deletions
|
@ -178,7 +178,7 @@ func (s *Service) UpdateTask(
|
|||
) (*connect.Response[runnerv1.UpdateTaskResponse], error) {
|
||||
runner := GetRunner(ctx)
|
||||
|
||||
task, err := actions_model.UpdateTaskByState(ctx, runner.ID, req.Msg.State)
|
||||
task, err := actions_service.UpdateTaskByState(ctx, runner.ID, req.Msg.State)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("update task: %w", err))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue