Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2018-05-07 15:21:44 +0300
committerToon Claes <toon@gitlab.com>2018-05-07 15:24:07 +0300
commit049080263684f2763b0abdbe310bb742253eca53 (patch)
tree96cebd04a0b00291e887cf8ae6ee10fe8016a2f0 /app/workers/repository_check/batch_worker.rb
parentca29aa114b200da81b2805dbe45fdc18a13400f9 (diff)
Use push events again to determine if repo needs checking
Diffstat (limited to 'app/workers/repository_check/batch_worker.rb')
-rw-r--r--app/workers/repository_check/batch_worker.rb12
1 files changed, 2 insertions, 10 deletions
diff --git a/app/workers/repository_check/batch_worker.rb b/app/workers/repository_check/batch_worker.rb
index cfe81a489bf..72f0a9b0619 100644
--- a/app/workers/repository_check/batch_worker.rb
+++ b/app/workers/repository_check/batch_worker.rb
@@ -32,16 +32,8 @@ module RepositoryCheck
# array of ID's. This is OK because we do it only once an hour, because
# getting ID's from Postgres is not terribly slow, and because no user
# has to sit and wait for this query to finish.
- def project_ids(batch_size = BATCH_SIZE)
- project_ids = never_checked_project_ids(batch_size)
-
- remaining_capacity = batch_size - project_ids.count
-
- if remaining_capacity > 0
- project_ids + old_checked_project_ids(remaining_capacity)
- else
- project_ids
- end
+ def project_ids
+ never_checked_project_ids(BATCH_SIZE) + old_checked_project_ids(BATCH_SIZE)
end
def never_checked_project_ids(batch_size)