Skip to content

Commit

Permalink
Merge pull request #415 from SchmidtDSE/mc-retry
Browse files Browse the repository at this point in the history
Add MC retry.
  • Loading branch information
sampottinger authored Sep 6, 2024
2 parents 6069298 + 3ae96ae commit 65694c3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions js/sim_presenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,14 +359,16 @@ class SimPresenter {
prePrograms.push(setupProgram);
}

return self._executeSingleInner(
const singleFuture = self._executeSingleInner(
true,
prePrograms,
[],
[self.getYear()],
)
.then((x) => getGoals(x.get(self.getYear())))
.then((x) => self._labelGoals(x, label));
);

return singleFuture.then((x) => getGoals(x.get(self.getYear())))
.then((x) => self._labelGoals(x, label))
.then((x) => x, () => self._executeSingle(label, setupProgram));
}

_labelGoals(targets, label) {
Expand Down

0 comments on commit 65694c3

Please sign in to comment.