separate rake task for migration and persistent one

This commit is contained in:
Dmitriy Zaporozhets 2013-04-05 20:44:16 +03:00
parent 10902c844f
commit 0da5a4fab1
2 changed files with 11 additions and 0 deletions

View 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