Follow-up from "Increase parallelism of geo repository sync worker"
The following discussions from !2351 (merged) should be addressed:
We might want to extract this to a module in future. No need now, though.
Oh, and this
We now repeat this fairly complex bit of business from
app/workers/geo_file_download_dispatch_worker.rb-- would it be worth putting this in a helper somewhere (though I couldn't begin to propose where)?
Can be addressed in a new issue.
Is there anything we can do to reduce the duplication between this and the mirroring logic, so if we ever improve the one, the other also benefits?
Instead of looping here, could we run this scheduler more often (every minute, like https://gitlab.com/gitlab-org/gitlab-ee/blob/master/lib/gitlab/mirror.rb#L6) and have each individual project sync worker check if it makes sense to run the scheduler again (like https://gitlab.com/gitlab-org/gitlab-ee/blob/master/app/workers/repository_update_mirror_worker.rb#L37)?