mirror of https://github.com/jumpserver/jumpserver
perf: 去掉 gunicorn threads
parent
ce3ec85147
commit
709b6e5b0d
|
@ -93,8 +93,8 @@ class BaseActionCommand(BaseCommand):
|
|||
|
||||
def add_arguments(self, parser):
|
||||
cores = 10
|
||||
if (multiprocessing.cpu_count() + 1) < cores:
|
||||
cores = multiprocessing.cpu_count() + 1
|
||||
if (multiprocessing.cpu_count() * 2 + 1) < cores:
|
||||
cores = multiprocessing.cpu_count() * 2 + 1
|
||||
|
||||
parser.add_argument(
|
||||
'services', nargs='+', choices=Services.export_services_values(), help='Service',
|
||||
|
|
|
@ -21,7 +21,6 @@ class GunicornService(BaseService):
|
|||
'gunicorn', 'jumpserver.asgi:application',
|
||||
'-b', bind,
|
||||
'-k', 'uvicorn.workers.UvicornWorker',
|
||||
'--threads', str(self.worker * 2),
|
||||
'-w', str(self.worker),
|
||||
'--max-requests', '4096',
|
||||
'--access-logformat', log_format,
|
||||
|
|
Loading…
Reference in New Issue