Increase fsck lock timeout to 24 hours

This commit is contained in:
Jacob Vosmaer 2016-04-12 15:56:44 +02:00
parent 5cf56e5647
commit 318314154e

View file

@ -37,9 +37,11 @@ class RepositoryCheckWorker
end
def try_obtain_lease(id)
# Use a 24-hour timeout because on servers/projects where 'git fsck' is
# super slow we definitely do not want to run it twice in parallel.
lease = Gitlab::ExclusiveLease.new(
"project_repository_check:#{id}",
timeout: RUN_TIME
timeout: 24.hours
)
lease.try_obtain
end