mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 15:09:32 -02:30
reload settings on fork or new thread
* Reloading settings will re-import cache. Django cache is thread aware, but keeping an old reference to the cache avoids the awareness.
This commit is contained in:
@@ -1086,8 +1086,11 @@ def cleanup_new_process(func):
|
||||
|
||||
@wraps(func)
|
||||
def wrapper_cleanup_new_process(*args, **kwargs):
|
||||
from awx.conf.settings import SettingsWrapper # noqa
|
||||
|
||||
django_connection.close()
|
||||
django_cache.close()
|
||||
SettingsWrapper.initialize()
|
||||
return func(*args, **kwargs)
|
||||
|
||||
return wrapper_cleanup_new_process
|
||||
|
||||
Reference in New Issue
Block a user