Commit 5d90de1f authored by Valery Sizov's avatar Valery Sizov

Add missing memoization for ContainerRepository client

parent 25918ea2
......@@ -5,6 +5,7 @@ require 'tempfile'
module Geo
class ContainerRepositorySync
include ExclusiveLeaseGuard
include Gitlab::Utils::StrongMemoize
LEASE_TIMEOUT = 1.hour.freeze
......@@ -96,10 +97,12 @@ module Geo
# The client for primary registry
def client
strong_memoize(:client) do
ContainerRegistry::Client.new(
Gitlab.config.geo.registry_replication.primary_api_url,
token: ::Auth::ContainerRegistryAuthenticationService.pull_access_token(name)
)
end
end
end
end
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