2
0
mirror of https://github.com/frappe/bench.git synced 2024-09-28 06:49:06 +00:00

perf: Remove multiprocessing from the import tree

This commit is contained in:
Aditya Hase 2021-02-21 10:02:41 +05:30
parent 104efd349b
commit 8527b106c3
No known key found for this signature in database
GPG Key ID: 0A55F0FCA0234972

View File

@ -1,7 +1,6 @@
# imports - standard imports
import getpass
import json
import multiprocessing
import os
# imports - third party imports
@ -54,6 +53,8 @@ def get_config_path(bench_path):
def get_gunicorn_workers():
'''This function will return the maximum workers that can be started depending upon
number of cpu's present on the machine'''
import multiprocessing
return {
"gunicorn_workers": multiprocessing.cpu_count() * 2 + 1
}