lifecycle: decrease default worker count on compose
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
aa4f7fb2b6
commit
66bb68a747
|
@ -51,7 +51,8 @@ logconfig_dict = {
|
|||
if SERVICE_HOST_ENV_NAME in os.environ:
|
||||
workers = 2
|
||||
else:
|
||||
workers = int(os.environ.get("WORKERS", cpu_count() * 2 + 1))
|
||||
default_workers = max(cpu_count() * 0.25, 1) + 1 # Minimum of 2 workers
|
||||
workers = int(os.environ.get("WORKERS", default_workers))
|
||||
threads = 4
|
||||
|
||||
warnings.simplefilter("once")
|
||||
|
|
Reference in New Issue