deb-aodh/aodh
Chris Dent 9e07e7d971 Correct thread handling in TranslationHook
TranslationHook was using a threading.local() to store an error
message however the threading.local() was being created in __init__
of the Hook. Hooks are not per request, so this wasn't really
working as planned.

Now, instead of using threading.local() at all, we just modify the
environ held by pecan (and later used by the
ParsableErrorMiddleware). environ is request-local.

This change feels a bit crufty because it is but because of the way
Exceptions are managed in the app there's not really any good way to do
it. We could consider changing the way Exceptions related to error
messages, but that would be a very large change.

Change-Id: I463059df28f291cea0644b1a9908a907f146ba1f
Closes-Bug: #1481244
2015-08-10 17:12:46 +00:00
..
api Correct thread handling in TranslationHook 2015-08-10 17:12:46 +00:00
cmd Stop using global conf object 2015-07-31 17:43:34 +02:00
evaluator gnocchi: percent_of_overlap=0 for agg. alarms 2015-08-05 16:31:48 +02:00
hacking Rename to aodh 2015-06-25 14:46:39 +02:00
locale Imported Translations from Transifex 2015-08-04 06:33:24 +00:00
notifier Stop using global conf object 2015-07-31 17:43:34 +02:00
openstack Switch to oslo.utils.fileutils 2015-07-24 10:13:05 +02:00
storage Use storage scenario test base to test migration 2015-08-07 15:40:10 +08:00
tests Use storage scenario test base to test migration 2015-08-07 15:40:10 +08:00
__init__.py Rename to aodh 2015-06-25 14:46:39 +02:00
coordination.py Stop using global conf object 2015-07-31 17:43:34 +02:00
i18n.py Rename to aodh 2015-06-25 14:46:39 +02:00
keystone_client.py keystone_client: stop using cfg.CONF 2015-07-24 10:13:31 +02:00
messaging.py rpc: stop using global conf object in some functions 2015-07-24 10:13:31 +02:00
opts.py Stop using global conf object 2015-07-31 17:43:34 +02:00
rpc.py Stop using global conf object 2015-07-31 17:43:34 +02:00
service.py Stop using global conf object 2015-07-31 17:43:34 +02:00
utils.py Rename to aodh 2015-06-25 14:46:39 +02:00