Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2019-01-09 23:54:38 +0300
committerToon Claes <toon@gitlab.com>2019-01-11 17:36:57 +0300
commit83767dd0b3d6fd477f6b08659737a29e2644343e (patch)
tree10138b6ebc1a594b8c50b0566616c4143cf5cb55 /lib/gitlab/background_migration
parent082cc1222512c826fa12b5e0fc99cb72da249f72 (diff)
Cleanup dead code and comments
Diffstat (limited to 'lib/gitlab/background_migration')
-rw-r--r--lib/gitlab/background_migration/backfill_project_repositories.rb20
1 files changed, 0 insertions, 20 deletions
diff --git a/lib/gitlab/background_migration/backfill_project_repositories.rb b/lib/gitlab/background_migration/backfill_project_repositories.rb
index 46aa7019f03..c8d83cc1803 100644
--- a/lib/gitlab/background_migration/backfill_project_repositories.rb
+++ b/lib/gitlab/background_migration/backfill_project_repositories.rb
@@ -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,