Commit 4654a4c1 authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Memoize project active runners to avoid N+1 queries

parent fb520340a238
......@@ -1418,7 +1418,9 @@ def all_runners
end
def any_runners?(&block)
all_runners.active.any?(&block)
@active_runners ||= all_runners.active
@active_runners.any?(&block)
end
def valid_runners_token?(token)
......
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