Commit 8091f143 authored by thorsten.vitt's avatar thorsten.vitt
Browse files

Start nailgun individually for each author.

Minimize risk & impact of OOM
parent 7c9f7f5e
......@@ -5,29 +5,34 @@
rm -rf "$odir/html"
start_saxon_server -Xmx512m 2114
trap stop_nailgun 1 2 3 13 15
for subdir in $odir/final/*
do
find -L $odir/final -name '*.item.xml' \
| sed -e "s,^$odir/final/,," \
| while read f
do
intermediate=`mktemp --tmpdir enzXXXXX.html`
echo "Converting $f to html ..."
saxon -xsl:html/stylesheets/db2xhtml.xsl \
-s:$odir/final/$f \
-o:$intermediate
if saxon -s:$intermediate \
-xsl:html/frame.xsl \
-o:$odir/html/${f}.html
then
rm $intermediate
else
echo "Failed to put $f into the textgridrep frame, using raw html"
mkdir -p `dirname "$odir/html/${f}.html"`
mv $intermediate $odir/html/${f}.html
fi
done
start_saxon_server -Xmx1024m 2114
trap stop_nailgun 1 2 3 13 15
stop_nailgun
trap - 1 2 3 13 15
find -L $subdir -name '*.item.xml' \
| sed -e "s,^$odir/final/,," \
| while read f
do
intermediate=`mktemp --tmpdir enzXXXXX.html`
echo "Converting $f to html ..."
saxon -xsl:html/stylesheets/db2xhtml.xsl \
-s:$odir/final/$f \
-o:$intermediate
if saxon -s:$intermediate \
-xsl:html/frame.xsl \
-o:$odir/html/${f}.html
then
rm $intermediate
else
echo "Failed to put $f into the textgridrep frame, using raw html"
mkdir -p `dirname "$odir/html/${f}.html"`
mv $intermediate $odir/html/${f}.html
fi
done
stop_nailgun
trap - 1 2 3 13 15
done
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment