Changeset 1229 for trunk/libIGCM


Ignore:
Timestamp:
09/02/15 17:05:17 (9 years ago)
Author:
sdipsl
Message:
  • further specify the post-processing tasks the supervisor is dealing with.
File:
1 edited

Legend:

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

    r1220 r1229  
    579579  IGCM_debug_PushStack "IGCM_debug_BigBro_Initialize" 
    580580 
     581  typeset postProcessingName postProcessingDate postProcessingDimn postProcessingComp postProcessingFile 
     582 
    581583# Message type standard fields: 
    582584# https://github.com/Prodiguer/prodiguer-docs/wiki/MQ-Standard-Message-Fields 
     
    629631      # Using standard fields for message others than the first one. Still subject to change 
    630632      genericSimulationID=$( echo "\"msgApplication\":\"monitoring\",\"msgProducer\":\"libigcm\",\"cumulPeriod\":\"${CumulPeriod}\",\"simuid\":\"${simuid}\",\"jobuid\":\"${jobuid}\"" ) 
     633       
     634      # Specify the post-processing task we are dealing with 
     635      n=$( echo "${Script_Post_Output}" | tr -d -c "\." | wc -c ) 
     636      postProcessingName=$( echo "${Script_Post_Output}" | gawk -F. '{print $1}' ) 
     637      postProcessingDate=$( echo "${Script_Post_Output}" | gawk -F. '{print $2}' ) 
     638      postProcessingDimn="N/A" 
     639      postProcessingComp="N/A" 
     640      postProcessingFile="N/A" 
     641      if [ ${n} -eq 3 ] ; then 
     642        postProcessingDimChunck=$( echo "${Script_Post_Output}" | gawk -F. '{print $3}' ) 
     643      elif [ ${n} -eq 5 ] ; then 
     644        postProcessingComp=$( echo "${Script_Post_Output}" | gawk -F. '{print $4}' ) 
     645        postProcessingFile=$( echo "${Script_Post_Output}" | gawk -F. '{print $5}' ) 
     646      fi 
     647 
    631648      # RabbitMQ message body with specific fields associated message codes treated here 
    632       Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"accountingProject\":\"${PROJECT}\",\"jobWarningDelay\":\"${jobWarningDelay}\",\"msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" ) 
     649      Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"accountingProject\":\"${PROJECT}\",\"jobWarningDelay\":\"${jobWarningDelay}\",\"msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\",\"postProcessingName\":\"${postProcessingName}\",\"postProcessingDate\":\"${postProcessingDate}\",\"postProcessingDimn\":\"${postProcessingDimn}\",\"postProcessingComp\":\"${postProcessingComp}\",\"postProcessingFile\":\"${postProcessingFile}\"}" ) 
    633650      # Fill the rabbitMQ queue 
    634651      IGCM_debug_sendAMQP 
Note: See TracChangeset for help on using the changeset viewer.