Skip to content

Commit

Permalink
remove check for legality in PannedAction.Deploy::actuate
Browse files Browse the repository at this point in the history
because it's now done for every action type in PlannedStrategy::act
  • Loading branch information
nicolaspayette committed Dec 6, 2023
1 parent 441316c commit e967812
Showing 1 changed file with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,9 @@ public double hoursItTake() {

@Override
public Action[] actuate(final Fisher fisher) {
if (isAllowedNow(fisher)) {
return delayInHours <= 0
? new Action[]{new FadDeploymentAction(fisher)}
: new Action[]{new FadDeploymentAction(fisher), new Delaying(delayInHours)};
} else {
// Sometimes a deployment that we planned for is not allowed anymore
// when we actually get to it. If that's the case, we just don't take
// the action. There should be a smarter way to do this but we are,
// again, just patching things up before a deadline.
return new Action[]{};
}
return delayInHours <= 0
? new Action[]{new FadDeploymentAction(fisher)}
: new Action[]{new FadDeploymentAction(fisher), new Delaying(delayInHours)};
}

@Override
Expand Down

0 comments on commit e967812

Please sign in to comment.