allow add middleware after app has started

this should completely fix "Cannot add middleware after an application has started" which can occur due to a race condition
This commit is contained in:
w-e-w
2024-12-28 14:43:23 +09:00
parent 813c3912fc
commit e936dbb43b
2 changed files with 38 additions and 3 deletions

View File

@@ -50,6 +50,7 @@ def check_versions():
def initialize():
from modules import initialize_util
initialize_util.allow_add_middleware_after_start()
initialize_util.fix_torch_version()
initialize_util.fix_pytorch_lightning()
initialize_util.fix_asyncio_event_loop_policy()