Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
18 lines
686 B
Plaintext
18 lines
686 B
Plaintext
export const commitTransaction = async function commitTransaction(incomingID = '') {
|
|
const transactionID = incomingID instanceof Promise ? await incomingID : incomingID;
|
|
// if the session was deleted it has already been aborted
|
|
if (!this.sessions[transactionID]) {
|
|
return;
|
|
}
|
|
const session = this.sessions[transactionID];
|
|
// Delete from registry FIRST to prevent race conditions
|
|
// This ensures other operations can't retrieve this session while we're ending it
|
|
delete this.sessions[transactionID];
|
|
try {
|
|
await session.resolve();
|
|
} catch (_) {
|
|
await session.reject();
|
|
}
|
|
};
|
|
|
|
//# sourceMappingURL=commitTransaction.js.map |