kopia lustrzana https://github.com/OpenDroneMap/WebODM
Simplify
rodzic
589d050f9c
commit
b83abd38c1
9
start.sh
9
start.sh
|
@ -147,14 +147,9 @@ else
|
|||
# Only set if `WEB_CONCURRENCY` is not defined, allows overriding.
|
||||
# See: https://docs.gunicorn.org/en/latest/settings.html#workers
|
||||
if [ -z "$WEB_CONCURRENCY" ]; then
|
||||
# Default gunicorn worker count to 2 x availabe cores + 1
|
||||
# nproc gives _available_ (rather than physicall present) CPU cores.
|
||||
CPU_COUNT=$(nproc)
|
||||
export WEB_CONCURRENCY=$((2*$CPU_COUNT+1))
|
||||
echo "Setting WEB_CONCURRENCY based on $CPU_COUNT available CPU cores to start $WEB_CONCURRENCY gunicorn workers."
|
||||
else
|
||||
echo "Using pre-defined WEB_CONCURRENCY override to start $WEB_CONCURRENCY gunicorn workers."
|
||||
export WEB_CONCURRENCY=$((2*$(nproc)+1))
|
||||
fi
|
||||
echo "Web concurrency set to $WEB_CONCURRENCY"
|
||||
|
||||
congrats
|
||||
|
||||
|
|
|
@ -49,13 +49,7 @@ environment_check(){
|
|||
# Only set if `WEB_CONCURRENCY` is not defined, allows overriding.
|
||||
# See: https://docs.gunicorn.org/en/latest/settings.html#workers
|
||||
if [ -z "$WEB_CONCURRENCY" ]; then
|
||||
# Default gunicorn worker count to 2 x availabe cores + 1
|
||||
# nproc gives _available_ (rather than physicall present) CPU cores.
|
||||
CPU_COUNT=$(nproc)
|
||||
export WEB_CONCURRENCY=$((2*$CPU_COUNT+1))
|
||||
echo "Setting WEB_CONCURRENCY based on $CPU_COUNT available CPU cores to start $WEB_CONCURRENCY gunicorn workers."
|
||||
else
|
||||
echo "Using pre-defined WEB_CONCURRENCY override to start $WEB_CONCURRENCY gunicorn workers."
|
||||
export WEB_CONCURRENCY=$((2*$(nproc)+1))
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue