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 'lib/tasks/gitlab/uploads/migrate.rake')
-rw-r--r--lib/tasks/gitlab/uploads/migrate.rake22
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|