MCPcopy
hub / github.com/hatchet-dev/hatchet / Get

Method Get

sdks/go/features/schedules.go:146–166  ·  view source on GitHub ↗

Get retrieves a specific scheduled workflow run by its ID.

(ctx context.Context, scheduledRunId string)

Source from the content-addressed store, hash-verified

144
145// Get retrieves a specific scheduled workflow run by its ID.
146func (s *SchedulesClient) Get(ctx context.Context, scheduledRunId string) (*rest.ScheduledWorkflows, error) {
147 scheduledRunIdUUID, err := uuid.Parse(scheduledRunId)
148 if err != nil {
149 return nil, errors.Wrap(err, "failed to parse scheduled run id")
150 }
151
152 resp, err := s.api.WorkflowScheduledGetWithResponse(
153 ctx,
154 s.tenantId,
155 scheduledRunIdUUID,
156 )
157 if err != nil {
158 return nil, errors.Wrap(err, "failed to get scheduled workflow run")
159 }
160
161 if err := validateJSON200Response(resp.StatusCode(), resp.Body, resp.JSON200); err != nil {
162 return nil, err
163 }
164
165 return resp.JSON200, nil
166}

Callers

nothing calls this directly

Calls 3

validateJSON200ResponseFunction · 0.85
StatusCodeMethod · 0.65

Tested by

no test coverage detected