2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-14 11:05:41 +00:00

Preload gunicorn app to only invoke the appconfig ready functions once

This commit is contained in:
wolflu05
2023-07-12 13:57:44 +00:00
parent ec801a0969
commit a6dc26335f
3 changed files with 9 additions and 0 deletions

View File

@ -8,3 +8,6 @@ workers = multiprocessing.cpu_count() * 2 + 1
max_requests = 1000
max_requests_jitter = 50
# preload app so that the ready functions are only executed once
preload_app = True

View File

@ -37,3 +37,6 @@ logger.info(f"Starting gunicorn server with {workers} workers")
max_requests = 1000
max_requests_jitter = 50
# preload app so that the ready functions are only executed once
preload_app = True

View File

@ -3,3 +3,6 @@ import multiprocessing
bind = "0.0.0.0:8000"
workers = multiprocessing.cpu_count() * 2 + 1
# preload app so that the ready functions are only executed once
preload_app = True