Geo - Remove unnecessary param from Geo::BaseSyncService#update_registry

parent 21f28dd5
......@@ -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")
......
......@@ -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
......
......@@ -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
......
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