Handling KeyboardInterrupt and create one Elasticsearch per thread