Commit c0851b77 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'mk/dry-up-container-repository-registry-replication-enabled' into 'master'

Geo: Dry up config usage

See merge request gitlab-org/gitlab!37821
parents 7c30cd16 f3d570a3
......@@ -8,7 +8,7 @@ module Geo
# rubocop:enable Scalability/CronWorkerContext
def perform
unless Gitlab.config.geo.registry_replication.enabled
unless ::Geo::ContainerRepositoryRegistry.replication_enabled?
log_info('Container Registry replication is not enabled')
return
end
......
......@@ -221,7 +221,7 @@ module Gitlab
end
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)
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} "
......@@ -271,7 +271,7 @@ module Gitlab
current_node_status.job_artifacts_failed_count,
current_node_status.design_repositories_failed_count
].tap do |r|
if Gitlab.config.geo.registry_replication.enabled
if ::Geo::ContainerRepositoryRegistry.replication_enabled?
r.push current_node_status.container_repositories_failed_count
end
......
......@@ -18,7 +18,7 @@ module Gitlab
private
def skippable?
!!Gitlab.config.geo.registry_replication.enabled
!!::Geo::ContainerRepositoryRegistry.replication_enabled?
end
# 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