Commit 60394546 authored by fwinkler's avatar fwinkler

Added email notification if post-processing script is kicked out by another script.

parent 1c53cf58
......@@ -11,21 +11,24 @@ function create_lock()
{
# lock script
if [ -f ${LOCK_POST_PROCESSING_SCRIPT} ]; then
echo -e "Post processing is already running..." 2>&1 | tee -a $DEBUG_PATH
echo -e "exit 0" 2>&1 | tee -a $DEBUG_PATH
pika_pp_running_text=/tmp/pika_pp_running.txt
touch ${pika_pp_running_text}
echo -e "The post-processing script was called while another script was still performing the post-processing." 2>&1 | tee ${pika_pp_running_text}
echo -e "Please check /tmp/pika_post_proccesing.out." 2>&1 | tee -a ${pika_pp_running_text}
echo -e "If the last post-processing script chrashed, you must delete the lock file /tmp/pika_post_proccesing.lock." 2>&1 | tee -a ${pika_pp_running_text}
# send email notification
send_email "[PIKA] post processing errors" ${pika_pp_running_text}
rm -f ${pika_pp_running_text}
exit 0
else
touch ${LOCK_POST_PROCESSING_SCRIPT}
echo -e "Start post processing..." |2>&1 tee $DEBUG_PATH
echo -e "Start post processing..." 2>&1 | tee $DEBUG_PATH
fi
}
function release_lock()
{
#check debug output
echo "failed" 2>&1 | tee -a $DEBUG_PATH
echo "halloerrorhallo" 2>&1 | tee -a $DEBUG_PATH
echo "ModuleNotFoundError" 2>&1 | tee -a $DEBUG_PATH
check_debug
if [ -f ${LOCK_POST_PROCESSING_SCRIPT} ]; then
......
Markdown is supported
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