Add requestPersistence call at TradeTask.complete call.

This is not really needed as we call it at each state change of the
trade but gives more redundancy in case we missed one or once
changes are applied and a dev forgets to call it.

Multiple repeated calls do have close to zero costs.
This commit is contained in:
chimp1984 2020-11-19 09:51:06 -05:00
parent da9b42fb83
commit d6f4eed39e
No known key found for this signature in database
GPG Key ID: 9801B4EC591F90E3

View File

@ -37,6 +37,13 @@ public abstract class TradeTask extends Task<Trade> {
processModel = trade.getProcessModel();
}
@Override
protected void complete() {
processModel.getTradeManager().requestPersistence();
super.complete();
}
@Override
protected void failed() {
trade.setErrorMessage(errorMessage);