Commit 9df890af authored by Patrick Bair's avatar Patrick Bair

Merge branch 'add-comment-to-background-migration-finalize-helper' into 'master'

Add comment to background migration finalize

See merge request gitlab-org/gitlab!73847
parents 3b77dbe0 498fd701
...@@ -85,6 +85,7 @@ module Gitlab ...@@ -85,6 +85,7 @@ module Gitlab
# Requeue pending jobs previously queued with #queue_background_migration_jobs_by_range_at_intervals # Requeue pending jobs previously queued with #queue_background_migration_jobs_by_range_at_intervals
# #
# This method is useful to schedule jobs that had previously failed. # This method is useful to schedule jobs that had previously failed.
# It can only be used if the previous background migration used job tracking like the queue_background_migration_jobs_by_range_at_intervals helper.
# #
# job_class_name - The background migration job class as a string # job_class_name - The background migration job class as a string
# delay_interval - The duration between each job's scheduled time # delay_interval - The duration between each job's scheduled time
...@@ -129,6 +130,7 @@ module Gitlab ...@@ -129,6 +130,7 @@ module Gitlab
# 4. Optionally remove job tracking information. # 4. Optionally remove job tracking information.
# #
# This method does not garauntee that all jobs completed successfully. # This method does not garauntee that all jobs completed successfully.
# It can only be used if the previous background migration used the queue_background_migration_jobs_by_range_at_intervals helper.
def finalize_background_migration(class_name, delete_tracking_jobs: ['succeeded']) def finalize_background_migration(class_name, delete_tracking_jobs: ['succeeded'])
# Empty the sidekiq queue. # Empty the sidekiq queue.
Gitlab::BackgroundMigration.steal(class_name) Gitlab::BackgroundMigration.steal(class_name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment