diff --git a/backend/src/util/TRANSACTION_LINK_LOCK.ts b/backend/src/util/TRANSACTION_LINK_LOCK.ts new file mode 100644 index 000000000..8058d9a81 --- /dev/null +++ b/backend/src/util/TRANSACTION_LINK_LOCK.ts @@ -0,0 +1,4 @@ +import { Semaphore } from 'await-semaphore' + +const CONCURRENT_TRANSACTIONS = 1 +export const TRANSACTION_LINK_LOCK = new Semaphore(CONCURRENT_TRANSACTIONS)