(ctx context.Context, taskID string)
| 1298 | } |
| 1299 | |
| 1300 | func (m *Service) startTaskExecutionProfile(ctx context.Context, taskID string) (ExecutionProfile, error) { |
| 1301 | profile, err := m.store.GetExecutionProfile(ctx, taskID) |
| 1302 | switch { |
| 1303 | case errors.Is(err, ErrExecutionProfileNotFound): |
| 1304 | return defaultExecutionProfile(taskID), nil |
| 1305 | case err != nil: |
| 1306 | return ExecutionProfile{}, fmt.Errorf("task: load execution profile for session start: %w", err) |
| 1307 | default: |
| 1308 | return profile, nil |
| 1309 | } |
| 1310 | } |
| 1311 | |
| 1312 | func (m *Service) stopUnboundStartedTaskSession(ctx context.Context, sessionID string) error { |
| 1313 | trimmedSessionID := strings.TrimSpace(sessionID) |
no test coverage detected