diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-24 09:09:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-24 09:09:01 +0300 |
commit | fa7ac2663b53f61551b9db51f16d55fa4e5b74c3 (patch) | |
tree | 0cbf33baee16b10803c1d23ec9e0c06e238e43f5 /app/workers/repository_check/batch_worker.rb | |
parent | 4870899d6cec693b58acbef91636e1310160fa28 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/workers/repository_check/batch_worker.rb')
-rw-r--r-- | app/workers/repository_check/batch_worker.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/workers/repository_check/batch_worker.rb b/app/workers/repository_check/batch_worker.rb index 1e2cb912598..d47f738ccb0 100644 --- a/app/workers/repository_check/batch_worker.rb +++ b/app/workers/repository_check/batch_worker.rb @@ -34,7 +34,7 @@ module RepositoryCheck end def perform_repository_checks - start = Time.now + start = Time.current # This loop will break after a little more than one hour ('a little # more' because `git fsck` may take a few minutes), or if it runs out of @@ -42,7 +42,7 @@ module RepositoryCheck # RepositoryCheckWorker each hour so that as long as there are repositories to # check, only one (or two) will be checked at a time. project_ids.each do |project_id| - break if Time.now - start >= RUN_TIME + break if Time.current - start >= RUN_TIME next unless try_obtain_lease_for_project(project_id) |