MCPcopy Index your code
hub / github.com/PeerDB-io/peerdb / getWorkflowID

Method getWorkflowID

flow/cmd/handler.go:650–661  ·  view source on GitHub ↗
(ctx context.Context, flowJobName string)

Source from the content-addressed store, hash-verified

648}
649
650func (h *FlowRequestHandler) getWorkflowID(ctx context.Context, flowJobName string) (string, error) {
651 q := "SELECT workflow_id FROM flows WHERE name = $1"
652 var workflowID string
653 if err := h.pool.QueryRow(ctx, q, flowJobName).Scan(&workflowID); err != nil {
654 if errors.Is(err, pgx.ErrNoRows) {
655 return "", exceptions.NewNotFoundError(fmt.Errorf("flow job %s not found", flowJobName))
656 }
657 return "", fmt.Errorf("unable to get workflowID for flow job %s: %w", flowJobName, err)
658 }
659
660 return workflowID, nil
661}
662
663func (h *FlowRequestHandler) resyncByRecreatingFlow(
664 ctx context.Context,

Callers 4

shutdownFlowMethod · 0.95
FlowStateChangeMethod · 0.95
MirrorStatusMethod · 0.95
cdcFlowStatusMethod · 0.95

Calls 2

ScanMethod · 0.45
QueryRowMethod · 0.45

Tested by

no test coverage detected