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

Function countNewlyInFlight

apps/sim/hooks/queries/tables.ts:324–330  ·  view source on GitHub ↗

Count groups flipped to in-flight (`pending`) by an optimistic schedule that * weren't in-flight before — the delta to add to the run-state counter.

(before: RowExecutions, after: RowExecutions)

Source from the content-addressed store, hash-verified

322/** Count groups flipped to in-flight (`pending`) by an optimistic schedule that
323 * weren't in-flight before — the delta to add to the run-state counter. */
324function countNewlyInFlight(before: RowExecutions, after: RowExecutions): number {
325 let n = 0
326 for (const gid of Object.keys(after)) {
327 if (after[gid]?.status === 'pending' && !isExecInFlight(before[gid])) n++
328 }
329 return n
330}
331
332/** The table's maintained, unfiltered `rowCount` from the detail cache (or
333 * `null` when the detail hasn't loaded). This is the right scope for a Run-all

Callers 3

useCreateTableRowFunction · 0.85
useUpdateTableRowFunction · 0.85
useBatchUpdateTableRowsFunction · 0.85

Calls 1

isExecInFlightFunction · 0.90

Tested by

no test coverage detected