diff options
author | Gabriel Mazetto <brodock@gmail.com> | 2019-01-23 03:40:05 +0100 |
---|---|---|
committer | Gabriel Mazetto <brodock@gmail.com> | 2019-03-01 15:49:20 +0100 |
commit | fc0ff92807620c36d01f23eb0d7d88b02cb141c1 (patch) | |
tree | 8241564fc370782be698266bb14d5c1a69a1ded0 /lib/tasks | |
parent | d63380fa93dff921c69f7aaa31ff004864e4db13 (diff) | |
download | gitlab-ce-fc0ff92807620c36d01f23eb0d7d88b02cb141c1.tar.gz |
Added Rollbacker workers and support on the rake task
Rollback is done similar to Migration for the Hashed Storage.
It also shares the same ExclusiveLease key to prevent both happening
at the same time.
All Hashed Storage related workers now share the same queue namespace
which allows for assigning dedicated workers easily.
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/gitlab/storage.rake | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/tasks/gitlab/storage.rake b/lib/tasks/gitlab/storage.rake index b759a2dad3a..a2136ce1b92 100644 --- a/lib/tasks/gitlab/storage.rake +++ b/lib/tasks/gitlab/storage.rake @@ -36,8 +36,8 @@ namespace :gitlab do print "Enqueuing migration of #{legacy_projects_count} projects in batches of #{helper.batch_size}" - helper.project_id_batches do |start, finish| - storage_migrator.bulk_schedule(start: start, finish: finish) + helper.project_id_batches_migration do |start, finish| + storage_migrator.bulk_schedule_migration(start: start, finish: finish) print '.' end @@ -81,8 +81,9 @@ namespace :gitlab do print "Enqueuing rollback of #{hashed_projects_count} projects in batches of #{helper.batch_size}" - helper.project_id_batches do |start, finish| - storage_migrator.bulk_schedule(start: start, finish: finish, operation: :rollback) + helper.project_id_batches_rollback do |start, finish| + puts "Start: #{start} FINISH: #{finish}" + storage_migrator.bulk_schedule_rollback(start: start, finish: finish) print '.' end |