Commit 996812e7 authored by Rémy Coutable's avatar Rémy Coutable

Don't try to stop already stopped environments

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent ec95d416
...@@ -81,7 +81,7 @@ class AutomatedCleanup ...@@ -81,7 +81,7 @@ class AutomatedCleanup
release = Quality::HelmClient::Release.new(environment.slug, 1, deployed_at.to_s, nil, nil, review_apps_namespace) release = Quality::HelmClient::Release.new(environment.slug, 1, deployed_at.to_s, nil, nil, review_apps_namespace)
releases_to_delete << release releases_to_delete << release
end end
elsif deployed_at < stop_threshold elsif environment.state != 'stopped' && deployed_at < stop_threshold
stop_environment(environment, deployment) stop_environment(environment, deployment)
else else
print_release_state(subject: 'Review App', release_name: environment.slug, release_date: last_deploy, action: 'leaving') print_release_state(subject: 'Review App', release_name: environment.slug, release_date: last_deploy, action: 'leaving')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment