|
|
@ -9,8 +9,8 @@ sys.path.append(chdir + '/class/core') |
|
|
|
sys.path.append("/usr/local/lib/python2.7/site-packages") |
|
|
|
sys.path.append("/usr/local/lib/python2.7/site-packages") |
|
|
|
import public |
|
|
|
import public |
|
|
|
import system_api |
|
|
|
import system_api |
|
|
|
# cpu_info = system_api.system_api().getCpuInfo() |
|
|
|
cpu_info = system_api.system_api().getCpuInfo() |
|
|
|
# workers = cpu_info[1] + 1 |
|
|
|
workers = cpu_info[1] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if not os.path.exists(os.getcwd() + '/logs'): |
|
|
|
if not os.path.exists(os.getcwd() + '/logs'): |
|
|
@ -25,7 +25,9 @@ if os.path.exists('data/ipv6.pl'): |
|
|
|
else: |
|
|
|
else: |
|
|
|
bind.append('0.0.0.0:%s' % mw_port) |
|
|
|
bind.append('0.0.0.0:%s' % mw_port) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if workers > 2: |
|
|
|
workers = 2 |
|
|
|
workers = 2 |
|
|
|
|
|
|
|
|
|
|
|
threads = 4 |
|
|
|
threads = 4 |
|
|
|
backlog = 512 |
|
|
|
backlog = 512 |
|
|
|
reload = False |
|
|
|
reload = False |
|
|
|