Update setting.py

This commit is contained in:
midoks
2019-07-31 21:42:29 +08:00
parent a16441e87d
commit f5cb06ea53
+5 -3
View File
@@ -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