Ignore:
Timestamp:
10/15/14 14:35:29 (10 years ago)
Author:
sdipsl
Message:

Minor bugfix to avoid sending config.card each time a simulation resubmit itself

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_debug/libIGCM_debug.ksh

    r1086 r1087  
    188188 
    189189  if [ X${initBigBro} = Xtrue ] ; then 
     190    #echo $(date +"%Y-%m-%dT%H:%M:%S.%N%z") > ${SUBMIT_DIR}/mail.txt 
    190191    mailx -s "[TEMPORARY AMQP CHANNEL]" -a ${SUBMIT_DIR}/config.card.base64 ${mail_recipient} < ${buffer} # send buffer 
    191192    rm -f $buffer ; touch ${buffer}                                    # clear buffer 
     
    193194    initBigBro=false 
    194195  elif ( [ ${send_messages} -eq 1 ] || [ X${FlushAMQP} = XTRUE ] ) ; then 
     196    #echo $(date +"%Y-%m-%dT%H:%M:%S.%N%z") >> ${SUBMIT_DIR}/mail.txt 
    195197    mailx -s "[TEMPORARY AMQP CHANNEL]" ${mail_recipient}  < ${buffer} # send buffer 
    196198    rm -f $buffer ; touch ${buffer}                                    # clear buffer 
     
    247249  fi 
    248250 
    249   status=$? 
    250251  if [ ${status} -gt 0 ] ; then 
    251252    IGCM_debug_Print 2 "IGCM_debug_Push/PopStack/ActivateBigBro : command sendAMQPMsg failed error code ${status}" 
     
    572573      simuid=$(uuidgen) 
    573574      IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Configuration simuid ${simuid} 
    574  
    575575      # Standard fields for the first message 
    576576      genericSimulationID=$( echo "\"msgApplication\":\"monitoring\",\"msgProducer\":\"libigcm\",\"activity\":\"IPSL\",\"name\":\"${config_UserChoices_JobName}\",\"cumulPeriod\":\"${CumulPeriod}\",\"experiment\":\"${config_UserChoices_ExperimentName}\",\"space\":\"${config_UserChoices_SpaceName}\",\"model\":\"${config_UserChoices_TagName}\",\"startDate\":\"${config_UserChoices_DateBegin}\",\"endDate\":\"${config_UserChoices_DateEnd}\",\"login\":\"${LOGIN}\",\"centre\":\"${CENTER}\",\"machine\":\"${MASTER}\",\"simuid\":\"${simuid}\",\"jobuid\":\"${jobuid}\"" ) 
     577      # RabbitMQ message body with specific fields associated message codes treated here 
     578      Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" ) 
     579      # Fill the rabbitMQ queue (the config.card in use will be sent) 
     580      IGCM_debug_sendAMQP activate 
    577581    else 
    578582      # RabbitMQ message code "A NEW JOB IS RUNNING PART OF A SIMULATION" 
    579583      code=1000 
    580       # 
    581584      # retrieve this simulation's unique id 
    582585      IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/run.card Configuration simuid 
    583586      simuid=${run_Configuration_simuid} 
    584  
    585587      # Using standard fields for message others than the first one. Still subject to change 
    586588      genericSimulationID=$( echo "\"msgApplication\":\"monitoring\",\"msgProducer\":\"libigcm\",\"cumulPeriod\":\"${CumulPeriod}\",\"simuid\":\"${simuid}\",\"jobuid\":\"${jobuid}\"" ) 
    587     fi 
    588  
    589     # RabbitMQ message body with specific fields associated message codes treated here 
    590     Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" ) 
    591  
    592     # Fill the rabbitMQ queue (the config.card in use will be sent) 
    593     IGCM_debug_sendAMQP activate 
     589      # RabbitMQ message body with specific fields associated message codes treated here 
     590      Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" ) 
     591      # Fill the rabbitMQ queue 
     592      IGCM_debug_sendAMQP 
     593    fi 
    594594 
    595595    # NOT VERY NICE BUT ... IT WORKS 
Note: See TracChangeset for help on using the changeset viewer.