Run least expensive method first
If environment is not available, then no point running the more expensive `prometheus_adapter`.
This commit is contained in:
parent
6fa900547d
commit
e99a55ffa7
|
@ -163,7 +163,7 @@ class Environment < ApplicationRecord
|
|||
end
|
||||
|
||||
def has_metrics?
|
||||
prometheus_adapter&.can_query? && available?
|
||||
available? && prometheus_adapter&.can_query?
|
||||
end
|
||||
|
||||
def metrics
|
||||
|
|
Loading…
Reference in New Issue