mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
[scripts] add environments UWSGI_WORKERS and UWSGI_THREADS
- UWSGI_WORKERS specifies the number of process. - UWSGI_THREADS specifies the number of threads. Templates for uwsgi scripts can be tested by:: UWSGI_WORKERS=8 UWSGI_THREADS=9 \ ./utils/searxng.sh --cmd\ eval "echo \"$(cat utils/templates/etc/uwsgi/*/searxng.ini*)\""\ | grep "workers\|threads" Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
17ca7eb514
commit
e4429ea520
5 changed files with 13 additions and 0 deletions
|
@ -177,6 +177,7 @@ main() {
|
|||
|
||||
case $1 in
|
||||
--getenv) var="$2"; echo "${!var}"; exit 0;;
|
||||
--cmd) shift; "$@";;
|
||||
-h|--help) usage; exit 0;;
|
||||
install)
|
||||
sudo_or_exit
|
||||
|
|
|
@ -47,6 +47,9 @@ plugin = python
|
|||
# default behaviour is for performance reasons.
|
||||
enable-threads = true
|
||||
|
||||
# Number of workers (usually CPU count)
|
||||
workers = ${UWSGI_WORKERS:-%k}
|
||||
threads = ${UWSGI_THREADS:-4}
|
||||
|
||||
# plugin: python
|
||||
# --------------
|
||||
|
|
|
@ -47,6 +47,9 @@ plugin = python
|
|||
# default behaviour is for performance reasons.
|
||||
enable-threads = true
|
||||
|
||||
# Number of workers (usually CPU count)
|
||||
workers = ${UWSGI_WORKERS:-%k}
|
||||
threads = ${UWSGI_THREADS:-4}
|
||||
|
||||
# plugin: python
|
||||
# --------------
|
||||
|
|
|
@ -50,6 +50,9 @@ plugin = python3,http
|
|||
# default behaviour is for performance reasons.
|
||||
enable-threads = true
|
||||
|
||||
# Number of workers (usually CPU count)
|
||||
workers = ${UWSGI_WORKERS:-%k}
|
||||
threads = ${UWSGI_THREADS:-4}
|
||||
|
||||
# plugin: python
|
||||
# --------------
|
||||
|
|
|
@ -50,6 +50,9 @@ plugin = python3,http
|
|||
# default behaviour is for performance reasons.
|
||||
enable-threads = true
|
||||
|
||||
# Number of workers (usually CPU count)
|
||||
workers = ${UWSGI_WORKERS:-%k}
|
||||
threads = ${UWSGI_THREADS:-4}
|
||||
|
||||
# plugin: python
|
||||
# --------------
|
||||
|
|
Loading…
Add table
Reference in a new issue