build elasticsearch searchindex without sleep
This commit is contained in:
parent
6fda64c7f6
commit
fe6ffb4fc2
1 changed files with 7 additions and 2 deletions
|
@ -223,8 +223,11 @@ function setup_elasticsearch () {
|
||||||
echo "# Configuring Elasticsearch..."
|
echo "# Configuring Elasticsearch..."
|
||||||
/usr/share/elasticsearch/bin/elasticsearch-plugin install mapper-attachments
|
/usr/share/elasticsearch/bin/elasticsearch-plugin install mapper-attachments
|
||||||
${INIT_CMD} restart elasticsearch
|
${INIT_CMD} restart elasticsearch
|
||||||
sleep 10
|
|
||||||
zammad run rails r "Setting.set('es_url', \"${ES_CONNECTION:-http://127.0.0.1:9200}\")"
|
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
|
zammad run rake searchindex:rebuild
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,9 +247,11 @@ function update_or_install () {
|
||||||
|
|
||||||
update_database_yml
|
update_database_yml
|
||||||
|
|
||||||
|
setup_elasticsearch
|
||||||
|
|
||||||
initialise_database
|
initialise_database
|
||||||
|
|
||||||
setup_elasticsearch
|
elasticsearch_searchindex_rebuild
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue