Remove GeoNode#project_registries method

parent e403dd19
......@@ -147,14 +147,6 @@ class GeoNode < ActiveRecord::Base
projects.where(id: project_id).exists?
end
def project_registries
if selective_sync?
Geo::ProjectRegistry.where(project_id: projects.pluck(:id))
else
Geo::ProjectRegistry.all
end
end
def filtered_project_registries(type = nil)
case type
when 'repository'
......
......@@ -81,7 +81,7 @@ module Geo
# @return [ActiveRecord::Relation<Project>] list of unsynced projects
def legacy_find_unsynced_projects
registry_project_ids = current_node.project_registries.pluck(:project_id)
registry_project_ids = Geo::ProjectRegistry.pluck(:project_id)
return current_node.projects if registry_project_ids.empty?
joined_relation = current_node.projects.joins(<<~SQL)
......@@ -96,7 +96,7 @@ module Geo
# @return [ActiveRecord::Relation<Project>] list of projects updated recently
def legacy_find_projects_updated_recently
legacy_find_projects(current_node.project_registries.dirty.retry_due.pluck(:project_id))
legacy_find_projects(Geo::ProjectRegistry.dirty.retry_due.pluck(:project_id))
end
# @return [ActiveRecord::Relation<Project>] list of synced projects
......
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