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
c87f86ef
Commit
c87f86ef
authored
Aug 21, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Geo - Remove unnecessary param from Geo::BaseSyncService#update_registry
parent
21f28dd5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
app/services/geo/base_sync_service.rb
app/services/geo/base_sync_service.rb
+1
-1
app/services/geo/repository_sync_service.rb
app/services/geo/repository_sync_service.rb
+4
-4
app/services/geo/wiki_sync_service.rb
app/services/geo/wiki_sync_service.rb
+3
-3
No files found.
app/services/geo/base_sync_service.rb
View file @
c87f86ef
...
...
@@ -65,7 +65,7 @@ module Geo
Gitlab
::
ExclusiveLease
.
cancel
(
lease_key
,
repository_lease
)
end
def
update_registry
(
type
,
started_at:
nil
,
finished_at:
nil
)
def
update_registry
(
started_at:
nil
,
finished_at:
nil
)
return
unless
started_at
||
finished_at
log_info
(
"Updating
#{
type
}
sync information"
)
...
...
app/services/geo/repository_sync_service.rb
View file @
c87f86ef
...
...
@@ -11,17 +11,17 @@ module Geo
def
fetch_project_repository
log_info
(
'Fetching project repository'
)
update_registry
(
:repository
,
started_at:
DateTime
.
now
)
update_registry
(
started_at:
DateTime
.
now
)
begin
project
.
ensure_repository
project
.
repository
.
fetch_geo_mirror
(
ssh_url_to_repo
)
update_registry
(
:repository
,
finished_at:
DateTime
.
now
)
update_registry
(
finished_at:
DateTime
.
now
)
rescue
Gitlab
::
Shell
::
Error
,
Geo
::
EmptyCloneUrlPrefixError
=>
e
log_error
(
"Error syncing repository"
,
e
)
log_error
(
'Error syncing repository'
,
e
)
rescue
Gitlab
::
Git
::
Repository
::
NoRepository
=>
e
log_error
(
"Invalid repository"
,
e
)
log_error
(
'Invalid repository'
,
e
)
log_info
(
'Expiring caches'
)
project
.
repository
.
after_create
end
...
...
app/services/geo/wiki_sync_service.rb
View file @
c87f86ef
...
...
@@ -10,18 +10,18 @@ module Geo
def
fetch_wiki_repository
log_info
(
'Fetching wiki repository'
)
update_registry
(
:wiki
,
started_at:
DateTime
.
now
)
update_registry
(
started_at:
DateTime
.
now
)
begin
project
.
wiki
.
ensure_repository
project
.
wiki
.
repository
.
fetch_geo_mirror
(
ssh_url_to_wiki
)
update_registry
(
:wiki
,
finished_at:
DateTime
.
now
)
update_registry
(
finished_at:
DateTime
.
now
)
rescue
Gitlab
::
Git
::
Repository
::
NoRepository
,
Gitlab
::
Shell
::
Error
,
ProjectWiki
::
CouldNotCreateWikiError
,
Geo
::
EmptyCloneUrlPrefixError
=>
e
log_error
(
"Error syncing wiki repository"
,
e
)
log_error
(
'Error syncing wiki repository'
,
e
)
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