Remove rake task update_commit_count

This commit is contained in:
Markus Koller 2016-12-03 17:00:04 +01:00
parent b8d8fd70d5
commit 6fd58ee48d
No known key found for this signature in database
GPG Key ID: A2B74A05A7A2B7B7
1 changed files with 0 additions and 20 deletions

View File

@ -1,20 +0,0 @@
namespace :gitlab do
desc "GitLab | Update commit count for projects"
task update_commit_count: :environment do
projects = Project.where(commit_count: 0)
puts "#{projects.size} projects need to be updated. This might take a while."
ask_to_continue unless ENV['force'] == 'yes'
projects.find_each(batch_size: 100) do |project|
print "#{project.name_with_namespace.color(:yellow)} ... "
unless project.repo_exists?
puts "skipping, because the repo is empty".color(:magenta)
next
end
project.update_commit_count
puts project.commit_count.to_s.color(:green)
end
end
end