fix tx start
This commit is contained in:
parent
e244dc058a
commit
3737af3a7d
1 changed files with 16 additions and 14 deletions
|
|
@ -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>) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue