diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /app/models/environment.rb | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'app/models/environment.rb')
-rw-r--r-- | app/models/environment.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/environment.rb b/app/models/environment.rb index 66613869915..deded3eeae0 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -305,6 +305,10 @@ class Environment < ApplicationRecord latest_opened_most_severe_alert.present? end + def has_running_deployments? + all_deployments.running.exists? + end + def metrics prometheus_adapter.query(:environment, self) if has_metrics_and_can_query? end @@ -395,7 +399,7 @@ class Environment < ApplicationRecord # Overrides ReactiveCaching default to activate limit checking behind a FF def reactive_cache_limit_enabled? - Feature.enabled?(:reactive_caching_limit_environment, project) + Feature.enabled?(:reactive_caching_limit_environment, project, default_enabled: true) end end |