Remove unnecessary check from GeoBackfillWorker

parent d338e3f7
......@@ -21,6 +21,11 @@ class GeoBackfillWorker
project = Project.find(project_id)
next if synced?(project)
# We try to obtain a lease here for the entire backfilling process
# because backfill the repositories continuously at a controlled rate
# instead of hammering the primary node. Initially, we are backfilling
# one repo at a time. If we don't obtain the lease here, every 5
# minutes all of 100 projects will be synced.
try_obtain_lease do |lease|, lease)
......@@ -36,8 +41,6 @@ class GeoBackfillWorker
def find_project_ids
return [] if Project.count == Geo::ProjectRegistry.count
Project.where.not(id: Geo::ProjectRegistry.pluck(:project_id))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment