(tx: DbOrTx)
| 6 | const LOCK_NOT_AVAILABLE_SQLSTATE = '55P03' |
| 7 | |
| 8 | export 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 | |
| 14 | export async function acquireWorkflowMcpServerLock(tx: DbOrTx, serverId: string): Promise<void> { |
| 15 | await setWorkflowMcpTransactionLockTimeout(tx) |
no test coverage detected