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
|
end
|
||||||
|
|
||||||
def has_metrics?
|
def has_metrics?
|
||||||
prometheus_adapter&.can_query? && available?
|
available? && prometheus_adapter&.can_query?
|
||||||
end
|
end
|
||||||
|
|
||||||
def metrics
|
def metrics
|
||||||
|
|
Loading…
Reference in New Issue