From cdedbc62c0e4bf98c9c8e14ca1796c1b72c6e67d Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 31 Jul 2019 21:42:29 +0800 Subject: [PATCH] Update setting.py --- setting.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setting.py b/setting.py index 824725648..6ab869850 100755 --- a/setting.py +++ b/setting.py @@ -9,8 +9,8 @@ sys.path.append(chdir + '/class/core') sys.path.append("/usr/local/lib/python2.7/site-packages") import public import system_api -# cpu_info = system_api.system_api().getCpuInfo() -# workers = cpu_info[1] + 1 +cpu_info = system_api.system_api().getCpuInfo() +workers = cpu_info[1] if not os.path.exists(os.getcwd() + '/logs'): @@ -25,7 +25,9 @@ if os.path.exists('data/ipv6.pl'): else: bind.append('0.0.0.0:%s' % mw_port) -workers = 2 +if workers > 2: + workers = 2 + threads = 4 backlog = 512 reload = False