Skip to content
Snippets Groups Projects
Commit fbe03c50 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Improved namespace activation task

parent be942d74
No related branches found
No related tags found
No related merge requests found
Loading
@@ -13,5 +13,32 @@ namespace :gitlab do
Loading
@@ -13,5 +13,32 @@ namespace :gitlab do
end end
end end
end end
Group.find_each(batch_size: 500) do |group|
if group.ensure_dir_exist
print '.'.green
else
print 'F'.red
end
end
git_path = Gitlab.config.git_base_path
Project.where('namespace_id IS NOT NULL').find_each(batch_size: 500) do |project|
next unless project.group
group = project.group
next if File.exists?(File.join(git_path, project.path_with_namespace))
next unless File.exists?(File.join(git_path, project.path))
begin
Gitlab::ProjectMover.new(project, '', group.path).execute
print '.'.green
rescue
print 'F'.red
end
end
end end
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment