Commit a6da2bf8 authored by Michael Kozono's avatar Michael Kozono

Merge branch '224222-invert-booleans-in-has_create_events-method' into 'master'

Geo:: Use default has_create_events? param for registries

Closes #224222

See merge request gitlab-org/gitlab!35732
parents 155108d5 da599c69
...@@ -265,10 +265,6 @@ For example, to add support for files referenced by a `Widget` model with a ...@@ -265,10 +265,6 @@ For example, to add support for files referenced by a `Widget` model with a
MODEL_FOREIGN_KEY = :widget_id MODEL_FOREIGN_KEY = :widget_id
belongs_to :widget, class_name: 'Widget' belongs_to :widget, class_name: 'Widget'
def self.has_create_events?
true
end
end end
``` ```
......
...@@ -52,6 +52,10 @@ class Geo::BaseRegistry < Geo::TrackingBase ...@@ -52,6 +52,10 @@ class Geo::BaseRegistry < Geo::TrackingBase
.limit(batch_size) .limit(batch_size)
end end
def self.has_create_events?
true
end
def model_record_id def model_record_id
read_attribute(self.class::MODEL_FOREIGN_KEY) read_attribute(self.class::MODEL_FOREIGN_KEY)
end end
......
...@@ -12,10 +12,6 @@ class Geo::PackageFileRegistry < Geo::BaseRegistry ...@@ -12,10 +12,6 @@ class Geo::PackageFileRegistry < Geo::BaseRegistry
sha_attribute :verification_checksum sha_attribute :verification_checksum
sha_attribute :verification_checksum_mismatched sha_attribute :verification_checksum_mismatched
def self.has_create_events?
true
end
def self.delete_for_model_ids(package_file_ids) def self.delete_for_model_ids(package_file_ids)
# TODO: https://gitlab.com/gitlab-org/gitlab/-/issues/222635 # TODO: https://gitlab.com/gitlab-org/gitlab/-/issues/222635
[] []
......
...@@ -46,10 +46,6 @@ class Geo::ProjectRegistry < Geo::BaseRegistry ...@@ -46,10 +46,6 @@ class Geo::ProjectRegistry < Geo::BaseRegistry
Feature.enabled?(:geo_project_registry_ssot_sync) Feature.enabled?(:geo_project_registry_ssot_sync)
end end
def self.has_create_events?
true
end
def self.find_registry_differences(range) def self.find_registry_differences(range)
source_ids = Gitlab::Geo.current_node.projects.id_in(range).pluck_primary_key source_ids = Gitlab::Geo.current_node.projects.id_in(range).pluck_primary_key
tracked_ids = self.pluck_model_ids_in_range(range) tracked_ids = self.pluck_model_ids_in_range(range)
......
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