ElasticSearch initial index: Make rake tasks complete in a reasonable time
In discussion with @pcarranza , he noted that elasticsearch initial indexing is kicked off using a rake tasks. The length of time this task takes to complete depends on the number of items to index, and in the case of GitLab.com, it can take several weeks. Multiple rake
processes are started
He proposed re-implementing the rake task in terms of sidekiq jobs - rather than synchronously indexing everything, it can just enqueue a job for each outstanding piece of work. These can run in a dedicated sidekiq queue and have their concurrency controlled using the normal sidekiq mechanisms, rather than spinning up rake processes in an ad-hoc manner.
/cc @maratkalibek @vsizov