Commit ed5ab3cb authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Fix memoization-related rubocop offense in project

parent 2abd509cd52b
......@@ -1417,10 +1417,14 @@ def all_runners
Ci::Runner.from("(#{union.to_sql}) ci_runners")
end
def any_runners?(&block)
@active_runners ||= all_runners.active
def active_runners
strong_memoize(:active_runners) do
all_runners.active
end
end
@active_runners.any?(&block)
def any_runners?(&block)
active_runners.any?(&block)
end
def valid_runners_token?(token)
......
......@@ -47,8 +47,6 @@ def initialize
# Sends a notification based on the number of executed SQL queries.
def act_upon_results
puts "XXXX\n\n\n\n\n #{count} \n\n\nXXXX"
return unless threshold_exceeded?
error = ThresholdExceededError.new(error_message)
......
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