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:
christopher-besch 2025-04-08 17:41:13 +02:00
parent 81b5c7ca6f
commit cdb4682bca
3 changed files with 92 additions and 93 deletions

View file

@ -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))
}