Skip to content

Commit

Permalink
yegor256#1906 ignore terminated
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Feb 29, 2024
1 parent 573373a commit 2085eb5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/rultor/agents/aws/PrunesInstances.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ public void execute(final Talks talks) throws IOException {
instance.getInstanceType(),
status, age
);
seen.add(label);
if (age < this.max) {
if ("terminated".equals(status)) {
continue;
}
if ("terminated".equals(status)) {
seen.add(label);
if (age < this.max) {
continue;
}
this.api.aws().terminateInstances(
Expand Down

0 comments on commit 2085eb5

Please sign in to comment.