Refactor Geo::RepositoryBackfillServer#try_obtain_lease to be more clear

parent 94c1fe59
...@@ -67,7 +67,10 @@ module Geo ...@@ -67,7 +67,10 @@ module Geo
repository_lease = Gitlab::ExclusiveLease.new(lease_key, timeout: LEASE_TIMEOUT).try_obtain repository_lease = Gitlab::ExclusiveLease.new(lease_key, timeout: LEASE_TIMEOUT).try_obtain
log('Could not obtain lease to sync repository') and return unless repository_lease if repository_lease.nil?
log('Could not obtain lease to sync repository')
return
end
yield yield
......
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