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
43ac9a55
Commit
43ac9a55
authored
Jun 04, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Geo: use GeoNode#clone_url_prefix for the Geo::RepositorySyncService
parent
7a048641
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
19 deletions
+1
-19
app/services/geo/repository_sync_service.rb
app/services/geo/repository_sync_service.rb
+1
-1
lib/gitlab/geo.rb
lib/gitlab/geo.rb
+0
-18
No files found.
app/services/geo/repository_sync_service.rb
View file @
43ac9a55
...
...
@@ -93,7 +93,7 @@ module Geo
end
def
primary_ssh_path_prefix
Gitlab
::
Geo
.
primary_
ssh_path
_prefix
Gitlab
::
Geo
.
primary_
node
.
clone_url
_prefix
end
def
ssh_url_to_repo
...
...
lib/gitlab/geo.rb
View file @
43ac9a55
...
...
@@ -58,10 +58,6 @@ module Gitlab
self
.
cache_value
(
:geo_node_secondary
)
{
self
.
enabled?
&&
self
.
current_node
&&
self
.
current_node
.
secondary?
}
end
def
self
.
primary_ssh_path_prefix
self
.
cache_value
(
:geo_primary_ssh_path_prefix
)
{
self
.
enabled?
&&
self
.
primary_node
&&
build_primary_ssh_path_prefix
}
end
def
self
.
geo_node?
(
host
:,
port
:)
GeoNode
.
where
(
host:
host
,
port:
port
).
exists?
end
...
...
@@ -145,19 +141,5 @@ module Gitlab
# urlsafe_base64 may return a string of size * 4/3
SecureRandom
.
urlsafe_base64
(
size
)[
0
,
size
]
end
def
self
.
build_primary_ssh_path_prefix
primary_host
=
"
#{
Gitlab
.
config
.
gitlab_shell
.
ssh_user
}
@
#{
self
.
primary_node
.
host
}
"
if
Gitlab
.
config
.
gitlab_shell
.
ssh_port
!=
22
"ssh://
#{
primary_host
}
:
#{
Gitlab
.
config
.
gitlab_shell
.
ssh_port
}
/"
else
if
self
.
primary_node
.
host
.
include?
':'
"[
#{
primary_host
}
]:"
else
"
#{
primary_host
}
:"
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