Commit e74c7bad authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'rename-sync-service-ee' into 'master'

Rename Geo::BaseSyncService class

Closes #12275

See merge request gitlab-org/gitlab-ee!15779
parents e2ee145c 04e47ded
......@@ -3,7 +3,7 @@
require 'securerandom'
module Geo
class BaseSyncService
class RepositoryBaseSyncService
include ExclusiveLeaseGuard
include ::Gitlab::Geo::ProjectLogHelpers
include ::Gitlab::ShellAdapter
......@@ -15,9 +15,9 @@ module Geo
attr_reader :project
GEO_REMOTE_NAME = 'geo'.freeze
LEASE_TIMEOUT = 8.hours.freeze
LEASE_KEY_PREFIX = 'geo_sync_service'.freeze
GEO_REMOTE_NAME = 'geo'
LEASE_TIMEOUT = 8.hours
LEASE_KEY_PREFIX = 'geo_sync_service'
def initialize(project)
@project = project
......@@ -143,8 +143,8 @@ module Geo
reschedule_sync unless persisted
log_info("Finished #{type} sync",
update_delay_s: update_delay_in_seconds,
download_time_s: download_time_in_seconds)
update_delay_s: update_delay_in_seconds,
download_time_s: download_time_in_seconds)
end
def reschedule_sync
......
# frozen_string_literal: true
module Geo
class RepositorySyncService < BaseSyncService
class RepositorySyncService < RepositoryBaseSyncService
self.type = :repository
private
......
# frozen_string_literal: true
module Geo
class WikiSyncService < BaseSyncService
class WikiSyncService < RepositoryBaseSyncService
self.type = :wiki
private
......
# frozen_string_literal: true
require 'spec_helper'
describe Geo::BaseSyncService do
let(:project) { build('project')}
describe Geo::RepositoryBaseSyncService do
let(:project) { build('project') }
subject { described_class.new(project) }
......
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