small fix to orders.queue locking

This commit is contained in:
Enno Rehling 2017-09-15 19:59:42 +02:00 committed by Enno Rehling
parent dc2663571c
commit 0ffb4e3ca9
1 changed files with 3 additions and 2 deletions

View File

@ -18,9 +18,10 @@ else
fi fi
ls -1rt orders.dir.$TURN/turn-* | xargs cat > orders.$TURN ls -1rt orders.dir.$TURN/turn-* | xargs cat > orders.$TURN
if [ -e orders.queue ] ; then
lockfile -r3 -l120 orders.queue.lock lockfile -r3 -l120 orders.queue.lock
if [ -e orders.queue ] ; then
mv orders.queue orders.dir.$TURN/orders.queue mv orders.queue orders.dir.$TURN/orders.queue
fi
rm -f orders.queue.lock rm -f orders.queue.lock
fi fi