Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
316eb6ef
Commit
316eb6ef
authored
Mar 30, 2018
by
Micaël Bergeron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apply feedback
parent
153dfda3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
lib/tasks/gitlab/uploads/migrate.rake
lib/tasks/gitlab/uploads/migrate.rake
+1
-1
spec/tasks/gitlab/uploads/migrate_rake_spec.rb
spec/tasks/gitlab/uploads/migrate_rake_spec.rb
+3
-1
No files found.
lib/tasks/gitlab/uploads/migrate.rake
View file @
316eb6ef
...
...
@@ -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
...
...
spec/tasks/gitlab/uploads/migrate_rake_spec.rb
View file @
316eb6ef
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment