fix tx start

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

View file

@ -217,7 +217,14 @@ 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.sendResponse({
success: true,
type: 'startTx',
data: operation.opId,
opId: operation.opId
});
return new Promise((resolve, reject) => {
this.activeTransaction = { this.activeTransaction = {
txId: operation.opId, txId: operation.opId,
manager: tx, manager: tx,
@ -225,13 +232,8 @@ class StorageProcessor {
reject reject
} }
}) })
}
}) })
this.sendResponse({
success: true,
type: 'startTx',
data: res,
opId: operation.opId
});
} }
private async handleEndTx(operation: EndTxOperation<any>) { private async handleEndTx(operation: EndTxOperation<any>) {