mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03:30
Merge pull request #10537 from chrismeyersfsu/fix-fork
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. The performance team that was hitting this every time before. With this change they are unable to recreated. Reviewed-by: Shane McDonald <me@shanemcd.com>
This commit is contained in:
commit
747231d350
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user