mirror of
https://github.com/nasa/openmct.git
synced 2025-06-05 17:01:41 +00:00
[Persistence] Use NestedTransaction
This commit is contained in:
parent
0fe0b21eda
commit
6f2c80bc2e
@ -21,8 +21,8 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
/*global define*/
|
||||||
define(
|
define(
|
||||||
['./Transaction'],
|
['./Transaction', './NestedTransaction'],
|
||||||
function (Transaction) {
|
function (Transaction, NestedTransaction) {
|
||||||
/**
|
/**
|
||||||
* Implements an application-wide transaction state. Once a
|
* Implements an application-wide transaction state. Once a
|
||||||
* transaction is started, calls to
|
* transaction is started, calls to
|
||||||
@ -50,8 +50,10 @@ define(
|
|||||||
TransactionService.prototype.startTransaction = function () {
|
TransactionService.prototype.startTransaction = function () {
|
||||||
if (this.transaction) {
|
if (this.transaction) {
|
||||||
this.transactionStack.push(this.transaction);
|
this.transactionStack.push(this.transaction);
|
||||||
|
this.transaction = new NestedTransaction(this.transaction);
|
||||||
|
} else {
|
||||||
|
this.transaction = new Transaction(this.$log);
|
||||||
}
|
}
|
||||||
this.transaction = new Transaction(this.$log);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user