MCPcopy Index your code
hub / github.com/simstudioai/sim / findSpanByBlockId

Function findSpanByBlockId

apps/sim/lib/table/backfill-runner.ts:58–69  ·  view source on GitHub ↗

DFS the trace tree for the first span matching `blockId`.

(
  spans: BackfillTraceSpan[] | undefined,
  blockId: string
)

Source from the content-addressed store, hash-verified

56
57/** DFS the trace tree for the first span matching `blockId`. */
58function findSpanByBlockId(
59 spans: BackfillTraceSpan[] | undefined,
60 blockId: string
61): BackfillTraceSpan | undefined {
62 if (!spans) return undefined
63 for (const span of spans) {
64 if (span.blockId === blockId) return span
65 const child = findSpanByBlockId(span.children, blockId)
66 if (child) return child
67 }
68 return undefined
69}
70
71/** One keyset page of completed (rowId, executionId) pairs for the group, ordered by rowId. */
72async function selectCompletedExecPage(

Callers 1

processBackfillPageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected