fix tx start

This commit is contained in:
boufni95 2025-03-10 19:13:25 +00:00
parent e244dc058a
commit 3737af3a7d

View file

@ -217,21 +217,23 @@ class StorageProcessor {
const res = await this.txQueue.PushToQueue({ const res = await this.txQueue.PushToQueue({
dbTx: false, dbTx: false,
description: operation.description || "startTx", description: operation.description || "startTx",
exec: tx => new Promise((resolve, reject) => { exec: tx => {
this.activeTransaction = { this.sendResponse({
txId: operation.opId, success: true,
manager: tx, type: 'startTx',
resolve, data: operation.opId,
reject opId: operation.opId
} });
}) return new Promise((resolve, reject) => {
this.activeTransaction = {
txId: operation.opId,
manager: tx,
resolve,
reject
}
})
}
}) })
this.sendResponse({
success: true,
type: 'startTx',
data: res,
opId: operation.opId
});
} }
private async handleEndTx(operation: EndTxOperation<any>) { private async handleEndTx(operation: EndTxOperation<any>) {