docs: def prepare_connection():
      """Set dafault connection for ElasticSearch.
  
      .. warning::
  
          In case of using multiprocessing/multithreading, connection will
          be probably initialized in the main process/thread and the same
          connection (socket) will be used in all processes/threads. This
          will cause some unexpected timeouts of pushes to Elasticsearch.
          So make sure that this function is called again in each
          process/thread to make sure that unique connection will be used.
      """
      elasticsearch_host = getattr(settings, 'ELASTICSEARCH_HOST', 'localhost')
      elasticsearch_port = getattr(settings, 'ELASTICSEARCH_PORT', 9200)
      connections.create_connection(hosts=['{}:{}'.format(elasticsearch_host, elasticsearch_port)])