print server log if starting server fails (#102)
This commit is contained in:
parent
98ef70e29b
commit
6c47e108f7
28
orcli
28
orcli
|
@ -1565,20 +1565,16 @@ orcli_test_command() {
|
||||||
trap '{ rm -rf "$OPENREFINE_TMPDIR"; rm -rf /tmp/jetty-127_0_0_1-3333*; kill -9 "$OPENREFINE_PID"; }' 0 2 3 15
|
trap '{ rm -rf "$OPENREFINE_TMPDIR"; rm -rf /tmp/jetty-127_0_0_1-3333*; kill -9 "$OPENREFINE_PID"; }' 0 2 3 15
|
||||||
|
|
||||||
# wait until OpenRefine is running (timeout 20s)
|
# wait until OpenRefine is running (timeout 20s)
|
||||||
ready="n"
|
|
||||||
for i in {1..20}; do
|
for i in {1..20}; do
|
||||||
|
sleep 1
|
||||||
if curl -fs "${OPENREFINE_URL}/command/core/get-version" &>/dev/null; then
|
if curl -fs "${OPENREFINE_URL}/command/core/get-version" &>/dev/null; then
|
||||||
ready="y"
|
log "started OpenRefine with tmp workspace ${OPENREFINE_TMPDIR}"
|
||||||
break
|
break
|
||||||
else
|
fi
|
||||||
sleep 1
|
if [[ $i == 20 ]]; then
|
||||||
|
error "starting OpenRefine server failed!" "$(cat "$OPENREFINE_TMPDIR/openrefine.log")"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [[ "$ready" == "y" ]]; then
|
|
||||||
log "started OpenRefine with tmp workspace ${OPENREFINE_TMPDIR}"
|
|
||||||
else
|
|
||||||
error "starting OpenRefine server failed!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# execute tests in subshell
|
# execute tests in subshell
|
||||||
export OPENREFINE_TMPDIR OPENREFINE_URL OPENREFINE_PID
|
export OPENREFINE_TMPDIR OPENREFINE_URL OPENREFINE_PID
|
||||||
|
@ -1860,20 +1856,16 @@ orcli_run_command() {
|
||||||
trap '{ rm -rf "$OPENREFINE_TMPDIR"; rm -rf /tmp/jetty-127_0_0_1-${OPENREFINE_URL##*:}*; kill -9 "$OPENREFINE_PID"; }' 0 2 3 15
|
trap '{ rm -rf "$OPENREFINE_TMPDIR"; rm -rf /tmp/jetty-127_0_0_1-${OPENREFINE_URL##*:}*; kill -9 "$OPENREFINE_PID"; }' 0 2 3 15
|
||||||
|
|
||||||
# wait until OpenRefine is running (timeout 20s)
|
# wait until OpenRefine is running (timeout 20s)
|
||||||
ready="n"
|
|
||||||
for i in {1..20}; do
|
for i in {1..20}; do
|
||||||
|
sleep 1
|
||||||
if curl -fs "${OPENREFINE_URL}/command/core/get-version" &>/dev/null; then
|
if curl -fs "${OPENREFINE_URL}/command/core/get-version" &>/dev/null; then
|
||||||
ready="y"
|
log "started OpenRefine with tmp workspace ${OPENREFINE_TMPDIR}"
|
||||||
break
|
break
|
||||||
else
|
fi
|
||||||
sleep 1
|
if [[ $i == 20 ]]; then
|
||||||
|
error "starting OpenRefine server failed!" "$(cat "$OPENREFINE_TMPDIR/openrefine.log")"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [[ "$ready" == "y" ]]; then
|
|
||||||
log "started OpenRefine" "port: ${args[--port]}" "memory: ${args[--memory]}" "tmpdir: ${OPENREFINE_TMPDIR}" "pid: ${OPENREFINE_PID}"
|
|
||||||
else
|
|
||||||
error "starting OpenRefine server failed!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# execute script(s) in subshell
|
# execute script(s) in subshell
|
||||||
export OPENREFINE_TMPDIR OPENREFINE_URL OPENREFINE_PID
|
export OPENREFINE_TMPDIR OPENREFINE_URL OPENREFINE_PID
|
||||||
|
|
|
@ -55,20 +55,16 @@ OPENREFINE_PID="$!"
|
||||||
trap '{ rm -rf "$OPENREFINE_TMPDIR"; rm -rf /tmp/jetty-127_0_0_1-${OPENREFINE_URL##*:}*; kill -9 "$OPENREFINE_PID"; }' 0 2 3 15
|
trap '{ rm -rf "$OPENREFINE_TMPDIR"; rm -rf /tmp/jetty-127_0_0_1-${OPENREFINE_URL##*:}*; kill -9 "$OPENREFINE_PID"; }' 0 2 3 15
|
||||||
|
|
||||||
# wait until OpenRefine is running (timeout 20s)
|
# wait until OpenRefine is running (timeout 20s)
|
||||||
ready="n"
|
|
||||||
for i in {1..20}; do
|
for i in {1..20}; do
|
||||||
|
sleep 1
|
||||||
if curl -fs "${OPENREFINE_URL}/command/core/get-version" &>/dev/null; then
|
if curl -fs "${OPENREFINE_URL}/command/core/get-version" &>/dev/null; then
|
||||||
ready="y"
|
log "started OpenRefine with tmp workspace ${OPENREFINE_TMPDIR}"
|
||||||
break
|
break
|
||||||
else
|
fi
|
||||||
sleep 1
|
if [[ $i == 20 ]]; then
|
||||||
|
error "starting OpenRefine server failed!" "$(cat "$OPENREFINE_TMPDIR/openrefine.log")"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [[ "$ready" == "y" ]]; then
|
|
||||||
log "started OpenRefine" "port: ${args[--port]}" "memory: ${args[--memory]}" "tmpdir: ${OPENREFINE_TMPDIR}" "pid: ${OPENREFINE_PID}"
|
|
||||||
else
|
|
||||||
error "starting OpenRefine server failed!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# execute script(s) in subshell
|
# execute script(s) in subshell
|
||||||
export OPENREFINE_TMPDIR OPENREFINE_URL OPENREFINE_PID
|
export OPENREFINE_TMPDIR OPENREFINE_URL OPENREFINE_PID
|
||||||
|
|
|
@ -35,20 +35,16 @@ OPENREFINE_PID="$!"
|
||||||
trap '{ rm -rf "$OPENREFINE_TMPDIR"; rm -rf /tmp/jetty-127_0_0_1-3333*; kill -9 "$OPENREFINE_PID"; }' 0 2 3 15
|
trap '{ rm -rf "$OPENREFINE_TMPDIR"; rm -rf /tmp/jetty-127_0_0_1-3333*; kill -9 "$OPENREFINE_PID"; }' 0 2 3 15
|
||||||
|
|
||||||
# wait until OpenRefine is running (timeout 20s)
|
# wait until OpenRefine is running (timeout 20s)
|
||||||
ready="n"
|
|
||||||
for i in {1..20}; do
|
for i in {1..20}; do
|
||||||
|
sleep 1
|
||||||
if curl -fs "${OPENREFINE_URL}/command/core/get-version" &>/dev/null; then
|
if curl -fs "${OPENREFINE_URL}/command/core/get-version" &>/dev/null; then
|
||||||
ready="y"
|
log "started OpenRefine with tmp workspace ${OPENREFINE_TMPDIR}"
|
||||||
break
|
break
|
||||||
else
|
fi
|
||||||
sleep 1
|
if [[ $i == 20 ]]; then
|
||||||
|
error "starting OpenRefine server failed!" "$(cat "$OPENREFINE_TMPDIR/openrefine.log")"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [[ "$ready" == "y" ]]; then
|
|
||||||
log "started OpenRefine with tmp workspace ${OPENREFINE_TMPDIR}"
|
|
||||||
else
|
|
||||||
error "starting OpenRefine server failed!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# execute tests in subshell
|
# execute tests in subshell
|
||||||
export OPENREFINE_TMPDIR OPENREFINE_URL OPENREFINE_PID
|
export OPENREFINE_TMPDIR OPENREFINE_URL OPENREFINE_PID
|
||||||
|
|
Loading…
Reference in New Issue