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

Function runOutsideTransactionContext

packages/db/tx-tripwire.ts:55–63  ·  view source on GitHub ↗
(fn: () => T)

Source from the content-addressed store, hash-verified

53 * back inside the transaction context and trip the wire.
54 */
55export function runOutsideTransactionContext<T>(fn: () => T): T {
56 return transactionContext.exit(() => {
57 const result = fn()
58 if (isThenable(result)) {
59 return Promise.resolve().then(() => result) as T
60 }
61 return result
62 })
63}
64
65const WARN_DEDUPE_WINDOW_MS = 5 * 60 * 1000
66const WARN_DEDUPE_MAX_KEYS = 256

Callers 3

readDeployedStateFunction · 0.90

Calls 3

isThenableFunction · 0.85
resolveMethod · 0.65
fnFunction · 0.50

Tested by

no test coverage detected