Extract a helper method

parent aae68f52
...@@ -16,10 +16,7 @@ module Geo ...@@ -16,10 +16,7 @@ module Geo
def execute def execute
return false unless Gitlab::Geo.primary? return false unless Gitlab::Geo.primary?
return false if design? && Feature.disabled?(:enable_geo_design_sync)
if source == Geo::RepositoryUpdatedEvent::DESIGN && Feature.disabled?(:enable_geo_design_sync)
return false
end
reset_repository_checksum! reset_repository_checksum!
create_repository_updated_event! create_repository_updated_event!
...@@ -39,10 +36,13 @@ module Geo ...@@ -39,10 +36,13 @@ module Geo
).create! ).create!
end end
def design?
source == Geo::RepositoryUpdatedEvent::DESIGN
end
def reset_repository_checksum! def reset_repository_checksum!
# We don't yet support verification for Design repositories # We don't yet support verification for Design repositories
return if source == Geo::RepositoryUpdatedEvent::DESIGN return if design?
return if repository_state.nil? return if repository_state.nil?
repository_state.update!( repository_state.update!(
......
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