Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Botelho <tiagonbotelho@hotmail.com>2018-05-03 17:19:21 +0300
committerTiago Botelho <tiagonbotelho@hotmail.com>2018-05-07 13:00:13 +0300
commit961255b107370a1350f91d0835cf0e849d237f7d (patch)
tree74690c9c0df07f86a6acccc5b7ebc51d310fefa2 /app/models/remote_mirror.rb
parent9a13059332a0c81b3a953f57bb9e40346eba951d (diff)
Adds remote mirror table migration
Diffstat (limited to 'app/models/remote_mirror.rb')
-rw-r--r--app/models/remote_mirror.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/models/remote_mirror.rb b/app/models/remote_mirror.rb
index b7e45875830..3b9fd6d710f 100644
--- a/app/models/remote_mirror.rb
+++ b/app/models/remote_mirror.rb
@@ -86,9 +86,12 @@ class RemoteMirror < ActiveRecord::Base
raw.update(options)
end
+ def sync?
+ !enabled?
+ end
+
def sync
- return unless enabled?
- return if Gitlab::Geo.secondary?
+ return if sync?
if recently_scheduled?
RepositoryUpdateRemoteMirrorWorker.perform_in(backoff_delay, self.id, Time.now)