Commit fbd5a719 authored by Tiago Botelho's avatar Tiago Botelho

Change RemoteMirror#sync? to be semantically sound

parent 85ef4943
......@@ -89,11 +89,11 @@ class RemoteMirror < ActiveRecord::Base
end
def sync?
!enabled?
enabled?
end
def sync
return if sync?
return unless sync?
if recently_scheduled?
RepositoryUpdateRemoteMirrorWorker.perform_in(backoff_delay, self.id, Time.now)
......
......@@ -3,7 +3,7 @@ module EE
extend ActiveSupport::Concern
def sync?
super || ::Gitlab::Geo.secondary?
super && !::Gitlab::Geo.secondary?
end
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