Commit e99a55ff authored by Thong Kuah's avatar Thong Kuah

Run least expensive method first

If environment is not available, then no point running the more
expensive `prometheus_adapter`.
parent 6fa90054
...@@ -163,7 +163,7 @@ class Environment < ApplicationRecord ...@@ -163,7 +163,7 @@ class Environment < ApplicationRecord
end end
def has_metrics? def has_metrics?
prometheus_adapter&.can_query? && available? available? && prometheus_adapter&.can_query?
end end
def metrics def metrics
......
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