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
fbd5a719
Commit
fbd5a719
authored
May 07, 2018
by
Tiago Botelho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change RemoteMirror#sync? to be semantically sound
parent
85ef4943
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/models/remote_mirror.rb
app/models/remote_mirror.rb
+2
-2
ee/app/models/ee/remote_mirror.rb
ee/app/models/ee/remote_mirror.rb
+1
-1
No files found.
app/models/remote_mirror.rb
View file @
fbd5a719
...
...
@@ -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
)
...
...
ee/app/models/ee/remote_mirror.rb
View file @
fbd5a719
...
...
@@ -3,7 +3,7 @@ module EE
extend
ActiveSupport
::
Concern
def
sync?
super
||
::
Gitlab
::
Geo
.
secondary?
super
&&
!
::
Gitlab
::
Geo
.
secondary?
end
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