Skip to content

Commit

Permalink
Now supporting ES_TIMEOUT
Browse files Browse the repository at this point in the history
  • Loading branch information
davedash committed Jun 28, 2011
1 parent 094a1d0 commit 1a82dd7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion elasticutils/__init__.py
Expand Up @@ -17,7 +17,9 @@
def get_es():
"""Return one es object."""
if not hasattr(_local, 'es'):
_local.es = ES(settings.ES_HOSTS, default_indexes=[settings.ES_INDEX])
timeout = getattr(settings, 'ES_TIMEOUT', 1)
_local.es = ES(settings.ES_HOSTS, default_indexes=[settings.ES_INDEX],
timeout=timeout)
return _local.es


Expand Down

0 comments on commit 1a82dd7

Please sign in to comment.