Commit c0699c17 authored by Tiago Botelho's avatar Tiago Botelho

Fix unscoping of imposed capacity limit by find_each method on Mirror scheduler

parent 9bd93670
......@@ -11,9 +11,7 @@ class UpdateAllMirrorsWorker
fail_stuck_mirrors!
unless Gitlab::Mirror.max_mirror_capacity_reached?
Project.mirrors_to_sync.find_each(batch_size: 200, &:import_schedule)
end
Project.mirrors_to_sync.each(&:import_schedule) unless Gitlab::Mirror.max_mirror_capacity_reached?
cancel_lease(lease_uuid)
end
......
---
title: Fixes unscoping of imposed capacity limit by find_each method on Mirror scheduler
merge_request: 2460
author:
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