diff options
author | Thong Kuah <tkuah@gitlab.com> | 2019-06-20 14:25:31 +1200 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2019-06-20 16:38:27 +1200 |
commit | 3129cbd555ef6770eb859614c08cc854ec07175f (patch) | |
tree | cfb66e7267c311c41f2b1dc89fc744c60010b7d4 | |
parent | 65b6a37fa6656fe2956a6a66011a6630545af229 (diff) | |
download | gitlab-ce-3129cbd555ef6770eb859614c08cc854ec07175f.tar.gz |
Run least expensive method first - has_metrics?reduce_prometheus_adapter
Success is relatively cheap compared to prometheus_adapter which can
invoke deployment_platform which does a lot of work
-rw-r--r-- | app/models/deployment.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/deployment.rb b/app/models/deployment.rb index 92c7311014a..ee6e830d3ec 100644 --- a/app/models/deployment.rb +++ b/app/models/deployment.rb @@ -179,7 +179,7 @@ class Deployment < ApplicationRecord end def has_metrics? - prometheus_adapter&.can_query? && success? + success? && prometheus_adapter&.can_query? end def metrics |