mirror of
https://github.com/frappe/bench.git
synced 2024-11-16 10:05:21 +00:00
perf: Remove multiprocessing from the import tree
This commit is contained in:
parent
104efd349b
commit
8527b106c3
@ -1,7 +1,6 @@
|
|||||||
# imports - standard imports
|
# imports - standard imports
|
||||||
import getpass
|
import getpass
|
||||||
import json
|
import json
|
||||||
import multiprocessing
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
# imports - third party imports
|
# imports - third party imports
|
||||||
@ -54,6 +53,8 @@ def get_config_path(bench_path):
|
|||||||
def get_gunicorn_workers():
|
def get_gunicorn_workers():
|
||||||
'''This function will return the maximum workers that can be started depending upon
|
'''This function will return the maximum workers that can be started depending upon
|
||||||
number of cpu's present on the machine'''
|
number of cpu's present on the machine'''
|
||||||
|
import multiprocessing
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"gunicorn_workers": multiprocessing.cpu_count() * 2 + 1
|
"gunicorn_workers": multiprocessing.cpu_count() * 2 + 1
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user