mirror of
https://github.com/YunoHost-Apps/meilisearch_ynh.git
synced 2024-09-03 19:45:59 +02:00
Fix
This commit is contained in:
parent
2e26a8ca90
commit
1494dabc45
1 changed files with 2 additions and 1 deletions
|
@ -192,12 +192,13 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|||
then
|
||||
tmp_dump_logs="$(mktemp -p $DUMPS_DIR)"
|
||||
ynh_debug --message="Running import command"
|
||||
dump=$(find $DUMPS_DIR -name "$dump_id.tar.gz" -o -name "$dump_id.dump" | head -1)
|
||||
/usr/bin/meilisearch --db-path $DUMPS_DIR/data.ms --import-dump $DUMPS_DIR/$dump_id.* --master-key $master_key --http-addr 127.0.0.1:$port --no-analytics true &> $tmp_dump_logs &
|
||||
dump_pid=$!
|
||||
dump_timeout=300
|
||||
for i in $(seq $dump_timeout)
|
||||
do
|
||||
if grep --quiet 'Dump importation from ".*" succeed' $tmp_dump_logs;
|
||||
if [ "$(curl --silent -X GET "$BASE_URL/health" | jq -r ".status")" == "available" ]
|
||||
then
|
||||
ynh_debug --message="Importation succeeded"
|
||||
break
|
||||
|
|
Loading…
Add table
Reference in a new issue