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
82143017
Commit
82143017
authored
Sep 02, 2020
by
Mehmet Emin INAC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not hold long transaction
parent
31996cf3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
ee/app/services/security/store_scans_service.rb
ee/app/services/security/store_scans_service.rb
+5
-5
No files found.
ee/app/services/security/store_scans_service.rb
View file @
82143017
...
...
@@ -9,9 +9,7 @@ module Security
def
execute
return
if
canceled_or_skipped?
ActiveRecord
::
Base
.
transaction
do
security_reports
.
each
{
|
_
,
report
|
store_scan_for
(
report
)
}
end
security_reports
.
each
{
|
_
,
report
|
store_scan_for
(
report
)
}
end
private
...
...
@@ -29,9 +27,11 @@ module Security
end
def
store_scan_for
(
report
)
security_scan
=
Security
::
Scan
.
safe_find_or_create_by!
(
build:
build
,
scan_type:
report
.
type
)
ActiveRecord
::
Base
.
transaction
do
security_scan
=
Security
::
Scan
.
safe_find_or_create_by!
(
build:
build
,
scan_type:
report
.
type
)
StoreFindingsMetadataService
.
execute
(
security_scan
,
report
)
StoreFindingsMetadataService
.
execute
(
security_scan
,
report
)
end
end
end
end
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