Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20240110090352_queue_backfill_partition_id_ci_pipeline_config.rb')
-rw-r--r--db/post_migrate/20240110090352_queue_backfill_partition_id_ci_pipeline_config.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/db/post_migrate/20240110090352_queue_backfill_partition_id_ci_pipeline_config.rb b/db/post_migrate/20240110090352_queue_backfill_partition_id_ci_pipeline_config.rb
new file mode 100644
index 00000000000..d5ae025b385
--- /dev/null
+++ b/db/post_migrate/20240110090352_queue_backfill_partition_id_ci_pipeline_config.rb
@@ -0,0 +1,26 @@
+# frozen_string_literal: true
+
+class QueueBackfillPartitionIdCiPipelineConfig < Gitlab::Database::Migration[2.2]
+ milestone '16.8'
+ restrict_gitlab_migration gitlab_schema: :gitlab_ci
+
+ MIGRATION = 'BackfillPartitionIdCiPipelineConfig'
+ DELAY_INTERVAL = 2.minutes
+ BATCH_SIZE = 1000
+ SUB_BATCH_SIZE = 100
+
+ def up
+ queue_batched_background_migration(
+ MIGRATION,
+ :ci_pipelines_config,
+ :pipeline_id,
+ job_interval: DELAY_INTERVAL,
+ batch_size: BATCH_SIZE,
+ sub_batch_size: SUB_BATCH_SIZE
+ )
+ end
+
+ def down
+ delete_batched_background_migration(MIGRATION, :ci_pipelines_config, :pipeline_id, [])
+ end
+end