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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
0a367278
Commit
0a367278
authored
Sep 30, 2019
by
Cameron Swords
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed prematurely optimized memoization of small array
parent
9fac26f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
ee/app/finders/security/jobs_finder.rb
ee/app/finders/security/jobs_finder.rb
+3
-11
No files found.
ee/app/finders/security/jobs_finder.rb
View file @
0a367278
...
...
@@ -15,8 +15,6 @@
module
Security
class
JobsFinder
include
Gitlab
::
Utils
::
StrongMemoize
attr_reader
:pipeline
JOB_TYPES
=
[
:sast
,
:dast
,
:dependency_scanning
,
:container_scanning
].
freeze
...
...
@@ -39,15 +37,9 @@ module Security
private
def
job_types_for_processing
strong_memoize
(
:job_types_for_processing
)
do
if
@params
[
:all
]
JOB_TYPES
else
JOB_TYPES
.
each_with_object
([])
do
|
job_type
,
job_types
|
job_types
<<
job_type
if
@params
[
job_type
]
end
end
end
return
JOB_TYPES
if
@params
[
:all
]
JOB_TYPES
.
select
{
|
job_type
|
@params
[
job_type
]
}
end
def
find_jobs
(
job_types
)
...
...
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