diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-04-26 13:35:52 +0200 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-04-26 13:35:52 +0200 |
commit | 3c0ab15a744835889934f4399908d6dd49ecab62 (patch) | |
tree | 9c5d7a3ebcc9ce2a6150066b2fcb017ccc3a7622 /app/workers | |
parent | f127edd012bd8b6f76ac67d69aadbd7d4837258f (diff) | |
download | gitlab-ce-3c0ab15a744835889934f4399908d6dd49ecab62.tar.gz |
Do not fsck projects less than a day old
This should bring the number of false positives down.
Diffstat (limited to 'app/workers')
-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 44b3145d50f..a3e16fa5212 100644 --- a/app/workers/repository_check/batch_worker.rb +++ b/app/workers/repository_check/batch_worker.rb @@ -33,8 +33,8 @@ module RepositoryCheck # has to sit and wait for this query to finish. def project_ids limit = 10_000 - never_checked_projects = Project.where('last_repository_check_at IS NULL').limit(limit). - pluck(:id) + never_checked_projects = Project.where('last_repository_check_at IS NULL AND created_at < ?', 24.hours.ago). + limit(limit).pluck(:id) old_check_projects = Project.where('last_repository_check_at < ?', 1.month.ago). reorder('last_repository_check_at ASC').limit(limit).pluck(:id) never_checked_projects + old_check_projects |