Commit ba97a421 authored by Pawel Chojnacki's avatar Pawel Chojnacki
Browse files

Remove default arguments for common query context

parent bf8706a62c87
......@@ -6,7 +6,9 @@ class AdditionalMetricsEnvironmentQuery < BaseQuery
def query(environment_id)
Environment.find_by(id: environment_id).try do |environment|
query_metrics(common_query_context(environment))
query_metrics(
common_query_context(environment, timeframe_start: 8.hours.ago.to_f, timeframe_end: Time.now.to_f)
)
end
end
end
......
......@@ -71,7 +71,7 @@ def matched_metrics
result.select { |group| group.metrics.any? }
end
def common_query_context(environment, timeframe_start: 8.hours.ago.to_f, timeframe_end: Time.now.to_f)
def common_query_context(environment, timeframe_start:, timeframe_end:)
{
timeframe_start: timeframe_start,
timeframe_end: timeframe_end,
......
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