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,15 +108,11 @@ module Geo ...@@ -108,15 +108,11 @@ module Geo
end end
def registries_for_job_artifacts def registries_for_job_artifacts
if use_legacy_queries_for_selective_sync?
legacy_finder.registries_for_job_artifacts
else
fdw_geo_node fdw_geo_node
.job_artifacts .job_artifacts
.inner_join_job_artifact_registry .inner_join_job_artifact_registry
.syncable .syncable
end end
end
def job_artifacts_unsynced(except_artifact_ids:) def job_artifacts_unsynced(except_artifact_ids:)
fdw_geo_node fdw_geo_node
......
...@@ -25,16 +25,5 @@ module Geo ...@@ -25,16 +25,5 @@ module Geo
Ci::JobArtifact Ci::JobArtifact
) )
end 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
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