#set -x %manual ###################################################################### # Purpose: Manage the requeue of all failed rsynch mag jobs. ###################################################################### ###################################################################### # Job specific troubleshooting instructions: # see generic troubleshoot manual page # ###################################################################### # include manual page below %end export ECF_PORT=%ECF_PORT% export ECF_NODE=%ECF_NODE% export ECF_NAME=%ECF_NAME% export ECF_PASS=%ECF_PASS% export ECF_TRYNO=%ECF_TRYNO% export ECF_RID=$$ ecflow_client --init=${ECF_RID} date pythondir=/home/mag.dev/ecfnets/python magout=/home/mag.dev/ecfnets/output/admin export date_now=`date +%%s` err=0 echo "This script is disabled. Edit to re-enable." #get list of mag jobs that are complete # lgan modify this to remove the rsync grep, so it will look at regular mag processer too #python ${pythondir}/node_status.py | grep "rsync" | grep aborted >${magout}/mag_aborted_list python ${pythondir}/node_status.py | grep aborted >${magout}/mag_aborted_list for model in `cat ${magout}/mag_aborted_list | awk -F" " '{print $1}'` do echo echo "JOB ABORTED - REQUEUE-ING TASK: $model" echo ecflow_client --requeue force $model export err=$? if [ $err -ne '0' ] then ecflow_client --abort="ecflow_client --force FAILED: $model NOT requeued" fi done if [ -s ${magout}/mag_aborted_list ] then echo echo "THE FOLLOWING HAVE BEEN REQUEUED:" cat ${magout}/mag_aborted_list echo fi rm -f ${magout}/mag_aborted_list date if test $err -eq '0' then ecflow_client --complete else ecflow_client --abort fi