summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-04-26 16:23:57 +0000
committerRémy Coutable <remy@rymai.me>2016-04-26 16:23:57 +0000
commitb65c4abd7409e681682e18acf070718af11a0851 (patch)
tree094e2bdc05092c5bf617eb52a5fe3d50dd74970b /app
parentdf8fda60fbbd2b6b38bdcb1680a0f24598c29f79 (diff)
parent3c0ab15a744835889934f4399908d6dd49ecab62 (diff)
downloadgitlab-ce-b65c4abd7409e681682e18acf070718af11a0851.tar.gz
Merge branch 'skip-fresh-repo-fsck' into 'master'
Do not fsck projects less than a day old This should bring the number of false positives down. Helps https://gitlab.com/gitlab-org/gitlab-ce/issues/15423 See merge request !3926
Diffstat (limited to 'app')
-rw-r--r--app/workers/repository_check/batch_worker.rb4
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