Remove legacy query to find registries for job artifacts

This commit removes the legacy queries to find registries
for job artifacts since we made Foreign Data Wrapper (FDW)
a hard requirement for Geo on GitLab 12.0.
parent 51cf7cb8
......@@ -108,14 +108,10 @@ module Geo
end
def registries_for_job_artifacts
if use_legacy_queries_for_selective_sync?
legacy_finder.registries_for_job_artifacts
else
fdw_geo_node
.job_artifacts
.inner_join_job_artifact_registry
.syncable
end
fdw_geo_node
.job_artifacts
.inner_join_job_artifact_registry
.syncable
end
def job_artifacts_unsynced(except_artifact_ids:)
......
......@@ -25,16 +25,5 @@ module Geo
Ci::JobArtifact
)
end
def registries_for_job_artifacts
return Geo::JobArtifactRegistry.all unless selective_sync?
legacy_inner_join_registry_ids(
Geo::JobArtifactRegistry.all,
current_node.job_artifacts.pluck_primary_key,
Geo::JobArtifactRegistry,
foreign_key: :artifact_id
)
end
end
end
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