Rename geo_syncable to syncable

parent 6ca2bca0
...@@ -38,9 +38,9 @@ module Geo ...@@ -38,9 +38,9 @@ module Geo
if use_legacy_queries_for_selective_sync? if use_legacy_queries_for_selective_sync?
legacy_finder.syncable legacy_finder.syncable
elsif selective_sync? elsif selective_sync?
job_artifacts.geo_syncable job_artifacts.syncable
else else
Ci::JobArtifact.geo_syncable Ci::JobArtifact.syncable
end end
end end
...@@ -157,13 +157,13 @@ module Geo ...@@ -157,13 +157,13 @@ module Geo
def fdw_find def fdw_find
job_artifacts job_artifacts
.inner_join_job_artifact_registry .inner_join_job_artifact_registry
.geo_syncable .syncable
end end
def fdw_find_unsynced(except_artifact_ids:) def fdw_find_unsynced(except_artifact_ids:)
job_artifacts job_artifacts
.missing_job_artifact_registry .missing_job_artifact_registry
.geo_syncable .syncable
.id_not_in(except_artifact_ids) .id_not_in(except_artifact_ids)
end end
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Geo module Geo
class LegacyJobArtifactRegistryFinder < RegistryFinder class LegacyJobArtifactRegistryFinder < RegistryFinder
def syncable def syncable
job_artifacts.geo_syncable job_artifacts.syncable
end end
def job_artifacts def job_artifacts
......
...@@ -16,8 +16,8 @@ module EE ...@@ -16,8 +16,8 @@ module EE
METRICS_REPORT_FILE_TYPES = %w[metrics].freeze METRICS_REPORT_FILE_TYPES = %w[metrics].freeze
scope :not_expired, -> { where('expire_at IS NULL OR expire_at > ?', Time.current) } scope :not_expired, -> { where('expire_at IS NULL OR expire_at > ?', Time.current) }
scope :geo_syncable, -> { with_files_stored_locally.not_expired }
scope :project_id_in, ->(ids) { joins(:project).merge(::Project.id_in(ids)) } scope :project_id_in, ->(ids) { joins(:project).merge(::Project.id_in(ids)) }
scope :syncable, -> { with_files_stored_locally.not_expired }
scope :with_files_stored_remotely, -> { where(file_store: ::JobArtifactUploader::Store::REMOTE) } scope :with_files_stored_remotely, -> { where(file_store: ::JobArtifactUploader::Store::REMOTE) }
scope :security_reports, -> do scope :security_reports, -> do
......
...@@ -13,8 +13,8 @@ module Geo ...@@ -13,8 +13,8 @@ module Geo
belongs_to :project, class_name: 'Geo::Fdw::Project', inverse_of: :job_artifacts belongs_to :project, class_name: 'Geo::Fdw::Project', inverse_of: :job_artifacts
scope :not_expired, -> { where('expire_at IS NULL OR expire_at > ?', Time.current) } scope :not_expired, -> { where('expire_at IS NULL OR expire_at > ?', Time.current) }
scope :geo_syncable, -> { with_files_stored_locally.not_expired }
scope :project_id_in, ->(ids) { joins(:project).merge(Geo::Fdw::Project.id_in(ids)) } scope :project_id_in, ->(ids) { joins(:project).merge(Geo::Fdw::Project.id_in(ids)) }
scope :syncable, -> { with_files_stored_locally.not_expired }
class << self class << self
def inner_join_job_artifact_registry def inner_join_job_artifact_registry
......
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