es_required will throw an exception the first time it's called on a secondary thread #22

Closed
erikrose opened this Issue Jan 12, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@erikrose
Member

erikrose commented Jan 12, 2012

https://github.com/davedash/elasticutils/blob/64a55ebaed0973a0027f3a0fffdfd8b7d083a903/elasticutils/__init__.py#L21 initializes the attr on _local only for the thread importing the module. Any other thread won't see that attr, and es_required() will throw an AttributeError the first time it's used on that thread.

@willkg

This comment has been minimized.

Show comment Hide comment
@willkg

willkg Jan 19, 2013

Member

In overhauling for pyelasticsearch, I nixed all the thread-local stuff. As a side note, while _local.disabled gets populated, it doesn't appear to ever get queried. So ... I'm not really sure what that was for anyhow.

Closing this out.

Member

willkg commented Jan 19, 2013

In overhauling for pyelasticsearch, I nixed all the thread-local stuff. As a side note, while _local.disabled gets populated, it doesn't appear to ever get queried. So ... I'm not really sure what that was for anyhow.

Closing this out.

@willkg willkg closed this Jan 19, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment