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

Function setWorkflowMcpTransactionLockTimeout

apps/sim/lib/mcp/server-locks.ts:8–12  ·  view source on GitHub ↗
(tx: DbOrTx)

Source from the content-addressed store, hash-verified

6const LOCK_NOT_AVAILABLE_SQLSTATE = '55P03'
7
8export async function setWorkflowMcpTransactionLockTimeout(tx: DbOrTx): Promise<void> {
9 await tx.execute(
10 sql`select set_config('lock_timeout', ${`${MCP_SERVER_LOCK_TIMEOUT_MS}ms`}, true)`
11 )
12}
13
14export async function acquireWorkflowMcpServerLock(tx: DbOrTx, serverId: string): Promise<void> {
15 await setWorkflowMcpTransactionLockTimeout(tx)

Calls 1

executeMethod · 0.65

Tested by

no test coverage detected