From fe6ffb4fc28be373376cb56f30544fac63d33ba1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Sun, 17 Sep 2017 01:51:17 +0200 Subject: [PATCH] build elasticsearch searchindex without sleep --- contrib/packager.io/functions | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/contrib/packager.io/functions b/contrib/packager.io/functions index 3475225b6..3b20be9d8 100644 --- a/contrib/packager.io/functions +++ b/contrib/packager.io/functions @@ -223,8 +223,11 @@ function setup_elasticsearch () { echo "# Configuring Elasticsearch..." /usr/share/elasticsearch/bin/elasticsearch-plugin install mapper-attachments ${INIT_CMD} restart elasticsearch - sleep 10 zammad run rails r "Setting.set('es_url', \"${ES_CONNECTION:-http://127.0.0.1:9200}\")" +} + +function elasticsearch_searchindex_rebuild () { + echo "# (Re)building Elasticsearch searchindex..." zammad run rake searchindex:rebuild } @@ -244,9 +247,11 @@ function update_or_install () { update_database_yml + setup_elasticsearch + initialise_database - setup_elasticsearch + elasticsearch_searchindex_rebuild fi }