diff options
Diffstat (limited to 'install/ishtar-install')
-rwxr-xr-x | install/ishtar-install | 48 |
1 files changed, 43 insertions, 5 deletions
diff --git a/install/ishtar-install b/install/ishtar-install index bb779a3f6..976c57c2c 100755 --- a/install/ishtar-install +++ b/install/ishtar-install @@ -298,6 +298,35 @@ EOF exit 1 fi + install_celery='' + cat >&2 <<-'EOF' + +------------------------------------------------------------------------------- + In order to make the consultation fluid post treatment are made intensively + in Ishtar. If you have a lot of data (> 10 000 items) installing a dedicated + daemon to do this post treatment is advised. This daemon is a new service + that performs background treatments. This daemon require RabbitMQ message + broker (auto installed). + +EOF + MSG="" + while [ "$install_celery" == '' ] + do + cecho y '* Install post treatment daemon? ([no]/yes) ' + read choice + case "$choice" in + yes ) install_celery="yes";; + y ) install_celery="yes";; + no ) install_celery="no";; + n ) install_celery="no";; + '' ) install_celery="no";; + esac + done + + echo "" + cecho g "*******************************************************************************" + echo "" + install_libreoffice='' cat >&2 <<-'EOF' @@ -450,6 +479,17 @@ EOF libreoffice libreoffice-script-provider-python python3-uno' ) fi + if [ "$install_celery" == 'yes' ]; then + ( set -x; $sh_c 'sleep 3; apt-get --no-install-recommends install -y -q \ + rabbitmq-server' ) + # buster: python3-celery + ( set -x; $sh_c 'pip3 install celery==4.2.1' ) + mkdir -p /var/log/celery/ + mkdir -p /var/run/celery/ + useradd -M --system -s /bin/false celery + chown celery:celery /var/log/celery/ /var/run/celery/ + fi + echo "-------------------------------------------------------------------------------"; cecho y "Installing django extra views" echo ""; @@ -482,11 +522,6 @@ EOF cecho y "Installing python3-virtualtime" echo ""; ( set -x; $sh_c 'pip3 install virtualtime==1.6' ) - ## not mandatory - # cecho y "Installing python3-django-background-tasks" - # echo ""; - #( set -x; $sh_c 'pip3 install django-background-tasks==1.1.11' - #) fi ;; @@ -509,6 +544,9 @@ EOF echo "ISHTAR_DB="$default_db >> $etc_path"config" echo "ISHTAR_WEBSERVER="$webserver >> $etc_path"config" echo "ISHTAR_LOCALE="$current_locale >> $etc_path"config" + if [ "$install_celery" == 'yes' ]; then + echo "USE_CELERY="$install_celery >> $etc_path"config" + fi echo "# settings added to all instances" >> $etc_path"extra_settings.py" echo "" cecho g "*******************************************************************************" |