Commit f3d570a3 authored by Mike Kozono's avatar Mike Kozono

Dry up config usage

parent 25f31ec1
...@@ -8,7 +8,7 @@ module Geo ...@@ -8,7 +8,7 @@ module Geo
# rubocop:enable Scalability/CronWorkerContext # rubocop:enable Scalability/CronWorkerContext
def perform def perform
unless Gitlab.config.geo.registry_replication.enabled unless ::Geo::ContainerRepositoryRegistry.replication_enabled?
log_info('Container Registry replication is not enabled') log_info('Container Registry replication is not enabled')
return return
end end
......
...@@ -221,7 +221,7 @@ module Gitlab ...@@ -221,7 +221,7 @@ module Gitlab
end end
def print_container_repositories_status def print_container_repositories_status
if Gitlab.config.geo.registry_replication.enabled if ::Geo::ContainerRepositoryRegistry.replication_enabled?
print 'Container repositories: '.rjust(GEO_STATUS_COLUMN_WIDTH) print 'Container repositories: '.rjust(GEO_STATUS_COLUMN_WIDTH)
show_failed_value(current_node_status.container_repositories_failed_count) show_failed_value(current_node_status.container_repositories_failed_count)
print "#{current_node_status.container_repositories_synced_count || 0}/#{current_node_status.container_repositories_count || 0} " print "#{current_node_status.container_repositories_synced_count || 0}/#{current_node_status.container_repositories_count || 0} "
...@@ -271,7 +271,7 @@ module Gitlab ...@@ -271,7 +271,7 @@ module Gitlab
current_node_status.job_artifacts_failed_count, current_node_status.job_artifacts_failed_count,
current_node_status.design_repositories_failed_count current_node_status.design_repositories_failed_count
].tap do |r| ].tap do |r|
if Gitlab.config.geo.registry_replication.enabled if ::Geo::ContainerRepositoryRegistry.replication_enabled?
r.push current_node_status.container_repositories_failed_count r.push current_node_status.container_repositories_failed_count
end end
......
...@@ -18,7 +18,7 @@ module Gitlab ...@@ -18,7 +18,7 @@ module Gitlab
private private
def skippable? def skippable?
!!Gitlab.config.geo.registry_replication.enabled !!::Geo::ContainerRepositoryRegistry.replication_enabled?
end end
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
......
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