Make sync_repository? and sync_wiki? methods easier to follow

parent b746cdaa
...@@ -39,11 +39,9 @@ module Geo ...@@ -39,11 +39,9 @@ module Geo
end end
def sync_repository? def sync_repository?
return true if registry.resync_repository? registry.resync_repository? ||
return true if registry.last_repository_successful_sync_at.nil? registry.last_repository_successful_sync_at.nil? ||
return true if registry.last_repository_synced_at.nil? registry.last_repository_synced_at.nil?
false
end end
def sync_wiki_repository def sync_wiki_repository
...@@ -54,11 +52,9 @@ module Geo ...@@ -54,11 +52,9 @@ module Geo
end end
def sync_wiki? def sync_wiki?
return true if registry.resync_wiki? registry.resync_wiki? ||
return true if registry.last_wiki_successful_sync_at.nil? registry.last_wiki_successful_sync_at.nil? ||
return true if registry.last_wiki_synced_at.nil? registry.last_wiki_synced_at.nil?
false
end end
def fetch_project_repository def fetch_project_repository
......
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