(fn: () => T)
| 53 | * back inside the transaction context and trip the wire. |
| 54 | */ |
| 55 | export 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 | |
| 65 | const WARN_DEDUPE_WINDOW_MS = 5 * 60 * 1000 |
| 66 | const WARN_DEDUPE_MAX_KEYS = 256 |
no test coverage detected