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
6db73123
Commit
6db73123
authored
Mar 05, 2021
by
Michał Zając
Committed by
Steve Abrams
Mar 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Schedule removal of duplicate Findings
parent
14addedb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
0 deletions
+38
-0
changelogs/unreleased/292239-schedule-duplicate-findings-removal.yml
...unreleased/292239-schedule-duplicate-findings-removal.yml
+5
-0
db/post_migrate/20210304133508_schedule_remove_duplicate_vulnerabilities_findings2.rb
...08_schedule_remove_duplicate_vulnerabilities_findings2.rb
+32
-0
db/schema_migrations/20210304133508
db/schema_migrations/20210304133508
+1
-0
No files found.
changelogs/unreleased/292239-schedule-duplicate-findings-removal.yml
0 → 100644
View file @
6db73123
---
title
:
Schedule removal of duplicate Findings
merge_request
:
55749
author
:
type
:
other
db/post_migrate/20210304133508_schedule_remove_duplicate_vulnerabilities_findings2.rb
0 → 100644
View file @
6db73123
# frozen_string_literal: true
class
ScheduleRemoveDuplicateVulnerabilitiesFindings2
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
MIGRATION
=
'RemoveDuplicateVulnerabilitiesFindings'
DELAY_INTERVAL
=
2
.
minutes
.
to_i
BATCH_SIZE
=
5_000
disable_ddl_transaction!
class
VulnerabilitiesFinding
<
ActiveRecord
::
Base
include
::
EachBatch
self
.
table_name
=
"vulnerability_occurrences"
end
def
up
say
"Scheduling
#{
MIGRATION
}
jobs"
queue_background_migration_jobs_by_range_at_intervals
(
VulnerabilitiesFinding
,
MIGRATION
,
DELAY_INTERVAL
,
batch_size:
BATCH_SIZE
)
end
def
down
# no-op
end
end
db/schema_migrations/20210304133508
0 → 100644
View file @
6db73123
a6bf41632fc3d81d2c015d2d848f4e74468ec8cfeb2a2afb644fd92189e95e21
\ No newline at end of file
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