Commit 83767dd0 authored by Toon Claes's avatar Toon Claes

Cleanup dead code and comments

parent 082cc122
---
title: Fix duplicate project disk path in BackfillLegacyProjectRepositories
merge_request: 24213
author:
type: changed
......@@ -189,11 +189,7 @@ module Gitlab
end
def perform(start_id, stop_id)
ActiveRecord::Base.logger = Logger.new(STDOUT)
Gitlab::Database.bulk_insert(:project_repositories, project_repositories(start_id, stop_id))
ActiveRecord::Base.logger = nil
end
private
......@@ -204,12 +200,6 @@ module Gitlab
end
def project_repositories(start_id, stop_id)
# .eager_load(:route, :parent, parent: [:route])
# .includes(:parent, :route, parent: [:route]).references(:namespaces)
# .includes(:parent).references(:namespaces)
# .joins(*routes_joins).references(:routes)
projects
.without_project_repository
.includes(:route, parent: [:route]).references(:routes)
......@@ -219,16 +209,6 @@ module Gitlab
.compact
end
def routes_joins
routes = Route.arel_table
projects = Project.arel_table
routes_projects = routes.alias('routes_projects')
projects.join(routes, Arel::Nodes::OuterJoin).on(projects[:namespace_id].eq(routes[:source_id]).and(routes[:source_type].eq('Namespace')))
.join(routes_projects, Arel::Nodes::OuterJoin).on(projects[:id].eq(routes_projects[:source_id]).and(routes_projects[:source_type].eq('Project')))
.join_sources
end
def build_attributes_for_project(project)
{
project_id: project.id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment