move stats to check task
This commit is contained in:
parent
5794f3cee0
commit
0691b1f5e1
|
@ -50,16 +50,18 @@ tasks:
|
||||||
--output output/deduped.tsv
|
--output output/deduped.tsv
|
||||||
|
|
||||||
check:
|
check:
|
||||||
|
- | # print stats
|
||||||
|
PID="$(lsof -t -i:${OPENREFINE_PORT})"
|
||||||
|
echo "used $(($(ps --no-headers -o rss -p "$PID") / 1024)) MB RAM"
|
||||||
|
echo "used $(ps --no-headers -o cputime -p "$PID") CPU time"
|
||||||
- | # check log file for any warnings
|
- | # check log file for any warnings
|
||||||
if grep -i 'exception\|error' "${OPENREFINE_TMPDIR}/log.txt"
|
if grep -i 'exception\|error' "${OPENREFINE_TMPDIR}/log.txt"
|
||||||
then echo 1>&2 "log contains warnings!"; echo; cat "${OPENREFINE_TMPDIR}/log.txt"; exit 1
|
then echo 1>&2 "log contains warnings!"; echo; cat "${OPENREFINE_TMPDIR}/log.txt"; exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
- | # print stats and kill OpenRefine immediately
|
- | # kill OpenRefine immediately
|
||||||
PID="$(lsof -t -i:${OPENREFINE_PORT})"
|
PID="$(lsof -t -i:${OPENREFINE_PORT})"
|
||||||
echo "used $(($(ps --no-headers -o rss -p "$PID") / 1024)) MB RAM"
|
|
||||||
echo "used $(ps --no-headers -o cputime -p "$PID") CPU time"
|
|
||||||
kill -9 $PID
|
kill -9 $PID
|
||||||
- | # delete temporary files
|
- | # delete temporary files
|
||||||
rm -rf "${OPENREFINE_TMPDIR}"
|
rm -rf "${OPENREFINE_TMPDIR}"
|
||||||
|
|
Loading…
Reference in New Issue