Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
be3a0377
Commit
be3a0377
authored
May 22, 2018
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix memoization-related rubocop offense in project
parent
e4eb330a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
app/models/project.rb
app/models/project.rb
+7
-3
lib/gitlab/query_limiting/transaction.rb
lib/gitlab/query_limiting/transaction.rb
+0
-2
No files found.
app/models/project.rb
View file @
be3a0377
...
...
@@ -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
)
...
...
lib/gitlab/query_limiting/transaction.rb
View file @
be3a0377
...
...
@@ -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\n
XXXX"
return
unless
threshold_exceeded?
error
=
ThresholdExceededError
.
new
(
error_message
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment