Skip to content
Snippets Groups Projects
Commit be3a0377 authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Fix memoization-related rubocop offense in project

parent e4eb330a
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -1417,10 +1417,14 @@ class Project < ActiveRecord::Base
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)
Loading
Loading
Loading
Loading
@@ -47,8 +47,6 @@ module Gitlab
 
# 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)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment