From 2085eb593b0e40c2fdebe4f852400c880fbc3cf3 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Thu, 29 Feb 2024 15:34:49 +0300 Subject: [PATCH] #1906 ignore terminated --- src/main/java/com/rultor/agents/aws/PrunesInstances.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/rultor/agents/aws/PrunesInstances.java b/src/main/java/com/rultor/agents/aws/PrunesInstances.java index 8816cebbf3..d59b81c435 100644 --- a/src/main/java/com/rultor/agents/aws/PrunesInstances.java +++ b/src/main/java/com/rultor/agents/aws/PrunesInstances.java @@ -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(