diff options
author | Thong Kuah <tkuah@gitlab.com> | 2019-06-19 14:56:47 +0300 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2019-06-19 15:02:29 +0300 |
commit | e99a55ffa775179da2868624c4811459f996cb02 (patch) | |
tree | 61db01f49733e763fd4bc488b1bc3c54f7a37a9f /app/models/environment.rb | |
parent | 6fa900547dbd30b0db0070f87dbeb4b05d485b9b (diff) |
Run least expensive method first
If environment is not available, then no point running the more
expensive `prometheus_adapter`.
Diffstat (limited to 'app/models/environment.rb')
-rw-r--r-- | app/models/environment.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/environment.rb b/app/models/environment.rb index aff20dae09b..09ab8e61a51 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -163,7 +163,7 @@ class Environment < ApplicationRecord end def has_metrics? - prometheus_adapter&.can_query? && available? + available? && prometheus_adapter&.can_query? end def metrics |