separate rake task for migration and persistent one
This commit is contained in:
parent
10902c844f
commit
0da5a4fab1
2 changed files with 11 additions and 0 deletions
11
lib/tasks/migrate/migrate_mr.rake
Normal file
11
lib/tasks/migrate/migrate_mr.rake
Normal file
|
@ -0,0 +1,11 @@
|
|||
# This taks will reload commits/diff for all merge requests
|
||||
desc "GITLAB | Migrate Merge Requests"
|
||||
task migrate_merge_requests: :environment do
|
||||
MergeRequest.find_each(batch_size: 20) do |mr|
|
||||
mr.st_commits = []
|
||||
mr.save
|
||||
mr.reload_code
|
||||
print '.'
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in a new issue