From 0064a5bb6a380b6c55e977d2dd03587f88d88d95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Sat, 9 Dec 2017 14:48:45 +0100 Subject: [PATCH] moved elasticsearch index rebuild process to background --- contrib/packager.io/functions | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/packager.io/functions b/contrib/packager.io/functions index 2b5ff5670..68302f6c8 100644 --- a/contrib/packager.io/functions +++ b/contrib/packager.io/functions @@ -241,12 +241,12 @@ function setup_elasticsearch () { } function elasticsearch_searchindex_rebuild () { + zammad run rails r "Setting.set('es_url', \"${ES_CONNECTION:-http://127.0.0.1:9200}\")" + if [ "${REBUILD_ES_SEARCHINDEX}" == "yes" ]; then echo "# (Re)building Elasticsearch searchindex..." - zammad run rails r "Setting.set('es_url', \"${ES_CONNECTION:-http://127.0.0.1:9200}\")" - - zammad run rake searchindex:rebuild + nohup zammad run rake searchindex:rebuild &> ${ZAMMAD_DIR}/log/searchindex-rebuild.log & fi } @@ -273,7 +273,7 @@ function update_or_install () { initialise_database fi - + elasticsearch_searchindex_rebuild }