(tx: DbOrTx, targetWorkspaceId: string)
| 102 | * this BEFORE {@link acquireForkEdgeLock} so the two are taken in a consistent order. |
| 103 | */ |
| 104 | export async function acquireForkTargetLock(tx: DbOrTx, targetWorkspaceId: string): Promise<void> { |
| 105 | await tx.execute( |
| 106 | sql`select pg_advisory_xact_lock(hashtextextended(${`fork-target:${targetWorkspaceId}`}, 0))` |
| 107 | ) |
| 108 | } |
no test coverage detected