perf: 去掉 gunicorn threads

pull/9143/head
吴小白 2 years ago
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…
Cancel
Save