MCPcopy Create free account
hub / github.com/compozy/agh / handleAutomationJobsCreate

Method handleAutomationJobsCreate

internal/extension/host_api.go:1454–1474  ·  view source on GitHub ↗
(ctx context.Context, raw json.RawMessage)

Source from the content-addressed store, hash-verified

1452}
1453
1454func (h *HostAPIHandler) handleAutomationJobsCreate(ctx context.Context, raw json.RawMessage) (any, error) {
1455 automation, err := h.automationManager()
1456 if err != nil {
1457 return nil, err
1458 }
1459
1460 var params hostAPIAutomationJobCreateParams
1461 if err := decodeHostAPIParams(raw, &params); err != nil {
1462 return nil, err
1463 }
1464
1465 job, err := h.jobFromCreateParams(ctx, params)
1466 if err != nil {
1467 return nil, err
1468 }
1469 if err := job.Validate("job"); err != nil {
1470 return nil, invalidParamsRPCError(err)
1471 }
1472
1473 return automation.CreateJob(ctx, job)
1474}
1475
1476func (h *HostAPIHandler) handleAutomationJobsUpdate(ctx context.Context, raw json.RawMessage) (any, error) {
1477 automation, err := h.automationManager()

Callers

nothing calls this directly

Calls 6

automationManagerMethod · 0.95
jobFromCreateParamsMethod · 0.95
decodeHostAPIParamsFunction · 0.85
invalidParamsRPCErrorFunction · 0.85
ValidateMethod · 0.65
CreateJobMethod · 0.65

Tested by

no test coverage detected