Commit 316eb6ef authored by Micaël Bergeron's avatar Micaël Bergeron

apply feedback

parent 153dfda3
...@@ -25,7 +25,7 @@ namespace :gitlab do ...@@ -25,7 +25,7 @@ namespace :gitlab do
Upload.class_eval { include EachBatch } unless Upload < EachBatch Upload.class_eval { include EachBatch } unless Upload < EachBatch
Upload Upload
.where(store: [nil, 1], .where(store: [nil, ObjectStorage::Store::LOCAL],
uploader: @uploader_class.to_s, uploader: @uploader_class.to_s,
model_type: @model_class.base_class.sti_name) model_type: @model_class.base_class.sti_name)
end end
......
...@@ -30,9 +30,11 @@ describe 'gitlab:uploads:migrate rake tasks' do ...@@ -30,9 +30,11 @@ describe 'gitlab:uploads:migrate rake tasks' do
end end
end end
it_behaves_like 'enqueue jobs in batch', batch: 4
context 'Upload has store = nil' do context 'Upload has store = nil' do
before do before do
Upload.where(model: projects.first(5)).update_all(store: nil) Upload.where(model: projects).update_all(store: nil)
end end
it_behaves_like 'enqueue jobs in batch', batch: 4 it_behaves_like 'enqueue jobs in batch', batch: 4
......
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