Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
5d90de1f
Commit
5d90de1f
authored
Oct 02, 2019
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing memoization for ContainerRepository client
parent
25918ea2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
ee/app/services/geo/container_repository_sync.rb
ee/app/services/geo/container_repository_sync.rb
+7
-4
No files found.
ee/app/services/geo/container_repository_sync.rb
View file @
5d90de1f
...
@@ -5,6 +5,7 @@ require 'tempfile'
...
@@ -5,6 +5,7 @@ require 'tempfile'
module
Geo
module
Geo
class
ContainerRepositorySync
class
ContainerRepositorySync
include
ExclusiveLeaseGuard
include
ExclusiveLeaseGuard
include
Gitlab
::
Utils
::
StrongMemoize
LEASE_TIMEOUT
=
1
.
hour
.
freeze
LEASE_TIMEOUT
=
1
.
hour
.
freeze
...
@@ -96,10 +97,12 @@ module Geo
...
@@ -96,10 +97,12 @@ module Geo
# The client for primary registry
# The client for primary registry
def
client
def
client
strong_memoize
(
:client
)
do
ContainerRegistry
::
Client
.
new
(
ContainerRegistry
::
Client
.
new
(
Gitlab
.
config
.
geo
.
registry_replication
.
primary_api_url
,
Gitlab
.
config
.
geo
.
registry_replication
.
primary_api_url
,
token:
::
Auth
::
ContainerRegistryAuthenticationService
.
pull_access_token
(
name
)
token:
::
Auth
::
ContainerRegistryAuthenticationService
.
pull_access_token
(
name
)
)
)
end
end
end
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment