diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /lib/tasks/gitlab/uploads/migrate.rake | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'lib/tasks/gitlab/uploads/migrate.rake')
-rw-r--r-- | lib/tasks/gitlab/uploads/migrate.rake | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/lib/tasks/gitlab/uploads/migrate.rake b/lib/tasks/gitlab/uploads/migrate.rake index 80290f95e8e..2a91fd1646c 100644 --- a/lib/tasks/gitlab/uploads/migrate.rake +++ b/lib/tasks/gitlab/uploads/migrate.rake @@ -2,15 +2,8 @@ namespace :gitlab do namespace :uploads do - namespace :migrate do - desc "GitLab | Uploads | Migrate all uploaded files to object storage" - task all: :environment do - Gitlab::Uploads::MigrationHelper.categories.each do |args| - Rake::Task["gitlab:uploads:migrate"].invoke(*args) - Rake::Task["gitlab:uploads:migrate"].reenable - end - end - end + desc "GitLab | Uploads | Migrate all uploaded files to object storage" + task 'migrate:all' => :migrate # The following is the actual rake task that migrates uploads of specified # category to object storage @@ -19,15 +12,8 @@ namespace :gitlab do Gitlab::Uploads::MigrationHelper.new(args, Logger.new($stdout)).migrate_to_remote_storage end - namespace :migrate_to_local do - desc "GitLab | Uploads | Migrate all uploaded files to local storage" - task all: :environment do - Gitlab::Uploads::MigrationHelper.categories.each do |args| - Rake::Task["gitlab:uploads:migrate_to_local"].invoke(*args) - Rake::Task["gitlab:uploads:migrate_to_local"].reenable - end - end - end + desc "GitLab | Uploads | Migrate all uploaded files to local storage" + task 'migrate_to_local:all' => :migrate_to_local desc 'GitLab | Uploads | Migrate the uploaded files of specified type to local storage' task :migrate_to_local, [:uploader_class, :model_class, :mounted_as] => :environment do |_t, args| |