Changeset 1206 for trunk/libIGCM/libIGCM_debug/libIGCM_debug.ksh
- Timestamp:
- 06/05/15 17:28:35 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_debug/libIGCM_debug.ksh
r1204 r1206 704 704 function IGCM_debug_Verif_Exit { 705 705 if ( ${ExitFlag} ) ; then 706 # Plan to send an email here with IGCM_sys_SendMail 707 if [ X${TaskType} != Xchecking ] ; then 706 echo "IGCM_debug_Verif_Exit : Something wrong happened previously." 707 # Only computing TaskType stops the job for now. 708 if [ X${TaskType} = Xcomputing ] ; then 708 709 IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Configuration PeriodState "Fatal" 709 echo "IGCM_debug_Verif_Exit : Something wrong happened previously."710 710 echo "IGCM_debug_Verif_Exit : ERROR and EXIT keyword will help find out where." 711 711 echo " EXIT THE JOB." 712 712 echo 713 713 IGCM_debug_CallStack 714 fi 715 716 if [ X${ActivateBigBro} = Xtrue ] ; then 717 # RabbitMQ message code "EXIT THE JOBS BECAUSE ERROR(S) HAS BEEN TRIGGERED" 718 code=9999 719 # RabbitMQ message body 720 Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" ) 721 # To be sure we flush message buffer and clean up behind us before the end of the simulation 722 FlushAMQP=true 723 # Fill the rabbitMQ queue 724 IGCM_debug_sendAMQP 725 fi 726 727 # Mail notification 728 IGCM_sys_SendMail 729 730 # And Good Bye 731 date 732 exit 1 733 fi 734 } 735 736 #D-#================================================== 737 #D-function IGCM_debug_Verif_Exit_Post 738 #D-* Purpose: exit with number 1 if ExitFlag is true for Post-treatment 739 #D- 740 function IGCM_debug_Verif_Exit_Post { 741 if ( ${ExitFlag} ) ; then 742 echo "IGCM_debug_Verif_Exit_Post : Something wrong happened." 743 # If SpaceName is PROD then we stop if post_processing fails 744 # Plan to send an email here with IGCM_sys_SendMail 745 if [ X${config_UserChoices_SpaceName} = XPROD ] ; then 746 echo " EXIT THE JOB." 747 echo 714 715 if [ X${ActivateBigBro} = Xtrue ] ; then 716 # RabbitMQ message code "EXIT THE JOBS BECAUSE ERROR(S) HAS BEEN TRIGGERED" 717 code=9999 718 # RabbitMQ message body 719 Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" ) 720 # To be sure we flush message buffer and clean up behind us before the end of the simulation 721 FlushAMQP=true 722 # Fill the rabbitMQ queue 723 IGCM_debug_sendAMQP 724 fi 725 748 726 # Mail notification 749 #IGCM_sys_SendMailPost 727 IGCM_sys_SendMail 728 750 729 # And Good Bye 751 730 date 752 731 exit 1 753 else 754 echo "Either inside config.card the variable SpaceName is not in PROD" 755 echo "or inside the main Job the variable JobType is not in RUN mode" 756 echo " SO WE DO NOT EXIT THE JOB." 757 echo 758 date 732 733 elif [ X${TaskType} = Xpost-processing ] ; then 734 # If SpaceName is PROD then we stop when post_processing failed 735 if [ X${config_UserChoices_SpaceName} = XPROD ] ; then 736 echo " EXIT THE JOB." 737 echo 738 # Mail notification? 739 #IGCM_sys_SendMailPost 740 # And Good Bye 741 date 742 exit 1 743 else 744 echo "Either inside config.card the variable SpaceName is not in PROD" 745 echo "or inside the main Job the variable JobType is not in RUN mode" 746 echo " SO WE DO NOT EXIT THE JOB." 747 echo 748 date 749 fi 750 elif [ X${TaskType} = Xchecking ] ; then 751 echo "Do nothing at the moment" 759 752 fi 760 753 fi
Note: See TracChangeset
for help on using the changeset viewer.