[StableOnly] Reset eventlet hub after patching
Patching the eventlet hub by setting the environment variable will not be effective if hub singleton was already set by some imported module. Calling `use_hub()` will reset it's value based on the current overrides. Change-Id: Ida6756b50266b4b2b2545f82e03e83e1c3be1e9e Closes-Bug: #1897877
This commit is contained in:
parent
615cfad757
commit
7f75fc1d4e
|
@ -31,3 +31,5 @@ def service_hub():
|
|||
|
||||
|
||||
os.environ['EVENTLET_HUB'] = 'oslo_service:service_hub'
|
||||
# reset hub in case it was initialized already by some imported module
|
||||
eventlet.hubs.use_hub(os.environ['EVENTLET_HUB'])
|
||||
|
|
Loading…
Reference in New Issue