From 42f44717c65fa24ed43a37e1c273340dbef1f8a2 Mon Sep 17 00:00:00 2001 From: Nicolas Maillat Date: Fri, 21 Oct 2022 15:25:11 +0200 Subject: [PATCH] PHRAS-3736 fix chown on tmp, exit 1 when worker count is wrong (#4156) --- docker/phraseanet/worker/entrypoint.sh | 10 +++--- lib/conf.d/configuration.yml | 45 ++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 4 deletions(-) diff --git a/docker/phraseanet/worker/entrypoint.sh b/docker/phraseanet/worker/entrypoint.sh index 767b36b22a..a28c29c0c7 100755 --- a/docker/phraseanet/worker/entrypoint.sh +++ b/docker/phraseanet/worker/entrypoint.sh @@ -3,12 +3,14 @@ set -e HEARTBEAT_INTERVAL=20 - +APP_DIR="/var/alchemy/Phraseanet" DOCKER_DIR="./docker/phraseanet" PHR_USER=app mkdir -p "${APP_DIR}/tmp/locks" \ - && chown -R app:app "${APP_DIR}/tmp" + && chown -R app:app "${APP_DIR}/tmp" \ + && chown -R app:app "${APP_DIR}/tmp/locks" + envsubst < "${DOCKER_DIR}/php.ini.sample" > /usr/local/etc/php/php.ini envsubst < "${DOCKER_DIR}/php-fpm.conf.sample" > /usr/local/etc/php-fpm.conf @@ -119,10 +121,10 @@ function check() { echo $date_time_process "-" $nb_process "running workers" if [ $nb_process -lt $NBR_WORKERS ]; then echo "One or more worker:execute is not running, exiting..." - # exit 1 + exit 1 elif [ $nb_heartbeat -lt 1 ]; then echo "worker:heartbeat is not running, exiting..." - # exit 1 + exit 1 fi } diff --git a/lib/conf.d/configuration.yml b/lib/conf.d/configuration.yml index 1ca3efde0a..3356a8d0a9 100644 --- a/lib/conf.d/configuration.yml +++ b/lib/conf.d/configuration.yml @@ -343,6 +343,51 @@ workers: webhook: timeout: 30 verify_ssl: true + queues: + assetsIngest: + max_retry: 3 + ttl_retry: 10000 + createRecord: + max_retry: 3 + ttl_retry: 10000 + editRecord: + max_retry: 3 + ttl_retry: 10000 + exportMail: + max_retry: 3 + ttl_retry: 10000 + exposeUpload: + max_retry: 3 + ttl_retry: 10000 + ftp: + max_retry: 3 + ttl_retry: 180000 + populateIndex: + max_retry: 3 + ttl_retry: 10000 + pullAssets: + max_retry: 3 + ttl_retry: 10000 + recordsActions: + max_retry: 3 + ttl_retry: 10000 + shareBasket: + max_retry: 3 + ttl_retry: 10000 + subdefCreation: + max_retry: 3 + ttl_retry: 10000 + ttl_delayed: 5000 + validationReminder: + max_retry: 3 + ttl_retry: 7200000 + webhook: + max_retry: 3 + ttl_retry: 10000 + writeMetadatas: + max_retry: 3 + ttl_retry: 10000 + ttl_delayed: 5000 externalservice: ginger: AutoSubtitling: