fix tx start
This commit is contained in:
parent
e244dc058a
commit
3737af3a7d
1 changed files with 16 additions and 14 deletions
|
|
@ -217,21 +217,23 @@ class StorageProcessor {
|
|||
const res = await this.txQueue.PushToQueue({
|
||||
dbTx: false,
|
||||
description: operation.description || "startTx",
|
||||
exec: tx => new Promise((resolve, reject) => {
|
||||
this.activeTransaction = {
|
||||
txId: operation.opId,
|
||||
manager: tx,
|
||||
resolve,
|
||||
reject
|
||||
}
|
||||
})
|
||||
exec: tx => {
|
||||
this.sendResponse({
|
||||
success: true,
|
||||
type: 'startTx',
|
||||
data: operation.opId,
|
||||
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>) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue