1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gitlab_ynh.git synced 2024-09-03 18:36:35 +02:00

Change unicorn_worker_processes

This commit is contained in:
Kay0u 2019-09-01 12:57:53 +02:00
parent 9470bfd368
commit fd6af9b07a
No known key found for this signature in database
GPG key ID: ABC3F52576D011D3
2 changed files with 2 additions and 2 deletions

View file

@ -55,7 +55,7 @@ else
fi
# https://docs.gitlab.com/ce/install/requirements.html#unicorn-workers
unicorn_worker_processes=$(python -c "print(int($(nproc) * 1.5 + 1))")
unicorn_worker_processes=$(bc <<< "($(nproc) * 1.5 + 1) / 1")
# If the server has at least 2GB of RAM
if [ $(ynh_check_ram --no_swap) -ge 2000 ]; then

View file

@ -66,7 +66,7 @@ fi
if [ -z "$unicorn_worker_processes" ]; then
# https://docs.gitlab.com/ce/install/requirements.html#unicorn-workers
unicorn_worker_processes=$(($(nproc) + 1 ))
unicorn_worker_processes=$(bc <<< "($(nproc) * 1.5 + 1) / 1")
# If the server has at least 2GB of RAM
if [ $(free -g --si | grep Mem: | awk '{print $2}') -ge 2 ]; then