Add timeout option to elasticsearch-indexer
This MR implements a process-wide timeout, which is configurable with the --timeout
option.
This timeout value will be passed in from the Sidekiq worker that spawns the process. We don't expect this timeout to frequently be activated but, instead, we're using this as a last resort because we have a timeout on our Redis lock used to prevent indexing the same project twice. In the rare event that indexing actually takes longer than 1 day to complete we believe it is better to kill the process than to allow the lock to be expired and therefore end up indexing the project twice in parallel since indexing it twice in parallel will cause more problems and will not be clear to operators what is going wrong.
Screenshots
Edited by Dmitry Gruzd