diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-19 15:12:41 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-19 15:12:41 +0300 |
commit | 0512d12bf15a0fc9b3ca29d7c854b34058d931a9 (patch) | |
tree | 210175512668ba59edc163a0c45d3d91c74f37b8 /db | |
parent | 94ecc00f47df7051eea905a5899053bf476e0589 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
4 files changed, 38 insertions, 0 deletions
diff --git a/db/post_migrate/20211022214523_schedule_recalculate_vulnerability_finding_signatures_for_findings.rb b/db/post_migrate/20211022214523_schedule_recalculate_vulnerability_finding_signatures_for_findings.rb new file mode 100644 index 00000000000..bccbc4e3209 --- /dev/null +++ b/db/post_migrate/20211022214523_schedule_recalculate_vulnerability_finding_signatures_for_findings.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +class ScheduleRecalculateVulnerabilityFindingSignaturesForFindings < Gitlab::Database::Migration[1.0] + MIGRATION = 'RecalculateVulnerabilityFindingSignaturesForFindings' + BATCH_SIZE = 1_000 + DELAY_INTERVAL = 2.minutes + + disable_ddl_transaction! + + def up + return unless Gitlab.ee? + + queue_background_migration_jobs_by_range_at_intervals( + define_batchable_model('vulnerability_finding_signatures'), + MIGRATION, + DELAY_INTERVAL, + batch_size: BATCH_SIZE, + track_jobs: true + ) + end + + def down + # no-op + end +end diff --git a/db/post_migrate/20211103141403_remove_propagate_service_template_worker.rb b/db/post_migrate/20211103141403_remove_propagate_service_template_worker.rb new file mode 100644 index 00000000000..d949641dbce --- /dev/null +++ b/db/post_migrate/20211103141403_remove_propagate_service_template_worker.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class RemovePropagateServiceTemplateWorker < Gitlab::Database::Migration[1.0] + def up + Sidekiq::Queue.new('propagate_service_template').clear + end + + def down + # no-op + end +end diff --git a/db/schema_migrations/20211022214523 b/db/schema_migrations/20211022214523 new file mode 100644 index 00000000000..b47f13696b0 --- /dev/null +++ b/db/schema_migrations/20211022214523 @@ -0,0 +1 @@ +b372da05f40fa67680b6a28ddf9bed3dc4b95795c144bf4367e4826b5cd64d6b
\ No newline at end of file diff --git a/db/schema_migrations/20211103141403 b/db/schema_migrations/20211103141403 new file mode 100644 index 00000000000..357a24ae4bb --- /dev/null +++ b/db/schema_migrations/20211103141403 @@ -0,0 +1 @@ +d16d62b2984586540a99aa5fc67de6459a4cd473089ddbae8d45e8783863d78d
\ No newline at end of file |