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:
authorMicaël Bergeron <mbergeron@gitlab.com>2018-03-30 15:38:56 +0300
committerMicaël Bergeron <mbergeron@gitlab.com>2018-03-30 15:39:12 +0300
commit316eb6ef60f00f47ab6ce0e6e24f88de9ac149eb (patch)
tree8f49a0130952945195c4c8b67d80569789799ee7
parent153dfda3a28048acee5be9795abdd073f5e6aae6 (diff)
apply feedback
-rw-r--r--lib/tasks/gitlab/uploads/migrate.rake2
-rw-r--r--spec/tasks/gitlab/uploads/migrate_rake_spec.rb4
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/tasks/gitlab/uploads/migrate.rake b/lib/tasks/gitlab/uploads/migrate.rake
index f0f4acd6140..e7e656a911b 100644
--- a/lib/tasks/gitlab/uploads/migrate.rake
+++ b/lib/tasks/gitlab/uploads/migrate.rake
@@ -25,7 +25,7 @@ namespace :gitlab do
Upload.class_eval { include EachBatch } unless Upload < EachBatch
Upload
- .where(store: [nil, 1],
+ .where(store: [nil, ObjectStorage::Store::LOCAL],
uploader: @uploader_class.to_s,
model_type: @model_class.base_class.sti_name)
end
diff --git a/spec/tasks/gitlab/uploads/migrate_rake_spec.rb b/spec/tasks/gitlab/uploads/migrate_rake_spec.rb
index f273992008e..53b1e45ba54 100644
--- a/spec/tasks/gitlab/uploads/migrate_rake_spec.rb
+++ b/spec/tasks/gitlab/uploads/migrate_rake_spec.rb
@@ -30,9 +30,11 @@ describe 'gitlab:uploads:migrate rake tasks' do
end
end
+ it_behaves_like 'enqueue jobs in batch', batch: 4
+
context 'Upload has store = nil' do
before do
- Upload.where(model: projects.first(5)).update_all(store: nil)
+ Upload.where(model: projects).update_all(store: nil)
end
it_behaves_like 'enqueue jobs in batch', batch: 4