Changeset 1049


Ignore:
Timestamp:
09/10/14 12:36:15 (10 years ago)
Author:
sdipsl
Message:

remove simuid and jobid. They have been scattered in several pieces to avoid ambiguity like simulationName=CM6PI.03 See #213

Location:
trunk/libIGCM
Files:
2 edited

Legend:

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

    r1048 r1049  
    12411241      code=1100 
    12421242      # RabbitMQ message body 
    1243       Body=$( echo "{\"code\":\"${code}\",\"uuid\":\"$(uuidgen)\",\"simuid\":\"${simuid}\",\"jobid\":\"${jobid}\",\"status\":\"OK\",\"timestamp\":\"$( date +"%Y-%m-%d-%T-%N" )\"}" ) 
     1243      Body=$( echo "{${GenericSimulationID},\"code\":\"${code}\",\"uuid\":\"$(uuidgen)\",\"status\":\"OK\",\"timestamp\":\"$( date +"%Y-%m-%d-%T-%N" )\"}" ) 
    12441244      # Fill the rabbitMQ queue 
    12451245      IGCM_debug_sendAMQP 
     
    12641264        code=0100 
    12651265        # RabbitMQ message body 
    1266         Body=$( echo "{\"code\":\"${code}\",\"uuid\":\"$(uuidgen)\",\"simuid\":\"${simuid}\",\"jobid\":\"${jobid}\",\"status\":\"OK\",\"timestamp\":\"$( date +"%Y-%m-%d-%T-%N" )\"}" ) 
     1266        Body=$( echo "{${GenericSimulationID},\"code\":\"${code}\",\"uuid\":\"$(uuidgen)\",\"status\":\"OK\",\"timestamp\":\"$( date +"%Y-%m-%d-%T-%N" )\"}" ) 
    12671267        # Fill the rabbitMQ queue 
    12681268        IGCM_debug_sendAMQP 
  • trunk/libIGCM/libIGCM_debug/libIGCM_debug.ksh

    r1048 r1049  
    223223 
    224224  # Log separately encoded AMQP message command for reuse in a mock up 
    225   echo sendAMQPMsg -h localhost -p 5672 ${additionnalOption} -b ${encodedBody} >> /tmp/send.AMQP.${jobid}.history.txt 
     225  echo sendAMQPMsg -h localhost -p 5672 ${additionnalOption} -b ${encodedBody} >> /tmp/send.AMQP.${config_UserChoices_JobName}.${config_UserChoices_ExperimentName}.${config_UserChoices_SpaceName}.${config_UserChoices_TagName}.${CumulPeriod}.history.txt 
    226226 
    227227  # Send the message 
     
    306306      code=2000 
    307307      # RabbitMQ message body 
    308       Body=$( echo "{\"code\":\"${code}\",\"uuid\":\"$(uuidgen)\",\"simuid\":\"${simuid}\",\"jobid\":\"${jobid}\",\"nesting\":\"${IGCM_debug_LenStack}\",\"command\":\"${INPUTS[*]}\",\"timestamp\":\"$( date +"%Y-%m-%d-%T-%N" )\"}" ) 
     308      Body=$( echo "{${GenericSimulationID},\"code\":\"${code}\",\"uuid\":\"$(uuidgen)\",\"nesting\":\"${IGCM_debug_LenStack}\",\"command\":\"${INPUTS[*]}\",\"timestamp\":\"$( date +"%Y-%m-%d-%T-%N" )\"}" ) 
    309309      # Fill the rabbitMQ queue 
    310310      IGCM_debug_sendAMQP 
     
    501501        code=9000 
    502502        # RabbitMQ message body 
    503         Body=$( echo "{\"code\":\"${code}\",\"uuid\":\"$(uuidgen)\",\"simuid\":\"${simuid}\",\"jobid\":\"${jobid}\",\"status\":\"NOK\",\"out\":\"true\",\"nesting\":\"${IGCM_debug_LenStack}\",\"command\":\"${INPUTS[*]}\",\"timestamp\":\"$( date +"%Y-%m-%d-%T-%N" )\"}" ) 
     503        Body=$( echo "{${GenericSimulationID},\"code\":\"${code}\",\"uuid\":\"$(uuidgen)\",\"status\":\"NOK\",\"out\":\"true\",\"nesting\":\"${IGCM_debug_LenStack}\",\"command\":\"${INPUTS[*]}\",\"timestamp\":\"$( date +"%Y-%m-%d-%T-%N" )\"}" ) 
    504504        # Fill the rabbitMQ queue 
    505505        IGCM_debug_sendAMQP 
     
    512512        code=3000 
    513513        # RabbitMQ message body 
    514         Body=$( echo "{\"code\":\"${code}\",\"uuid\":\"$(uuidgen)\",\"simuid\":\"${simuid}\",\"jobid\":\"${jobid}\",\"status\":\"OK\",\"out\":\"true\",\"nesting\":\"${IGCM_debug_LenStack}\",\"command\":\"${INPUTS[*]}\",\"timestamp\":\"$( date +"%Y-%m-%d-%T-%N" )\"}" ) 
     514        Body=$( echo "{${GenericSimulationID},\"code\":\"${code}\",\"uuid\":\"$(uuidgen)\",\"status\":\"OK\",\"out\":\"true\",\"nesting\":\"${IGCM_debug_LenStack}\",\"command\":\"${INPUTS[*]}\",\"timestamp\":\"$( date +"%Y-%m-%d-%T-%N" )\"}" ) 
    515515        # Fill the rabbitMQ queue 
    516516        IGCM_debug_sendAMQP 
     
    542542 
    543543  if [ X${BigBrother} = Xtrue ] ; then 
    544     # ID to identify a simulation 
    545     simuid=${config_UserChoices_JobName}.${config_UserChoices_ExperimentName}.${config_UserChoices_SpaceName}.${config_UserChoices_TagName}.${LOGIN}.${CENTER}.${MASTER} 
    546  
    547     # ID to identify a job. Several Jobs are needed to complete a simulation 
    548     jobid=${config_UserChoices_JobName}.${config_UserChoices_ExperimentName}.${config_UserChoices_SpaceName}.${config_UserChoices_TagName}.${LOGIN}.${CENTER}.${MASTER}.${CumulPeriod} 
     544    # ID to identify a simulation and the current Job. Still subject to change 
     545    GenericSimulationID=$( echo "\"simulationName\":\"${config_UserChoices_JobName}\",\"Experiment\":\"${config_UserChoices_ExperimentName}\",\"SpaceName\":\"${config_UserChoices_SpaceName}\",\"Model\":\"${config_UserChoices_TagName}\",\"Login\":\"${LOGIN}\",\"Center\":\"${CENTER}\",\"Machine\":\"${MASTER}\",\"CumulPeriod\":\"${CumulPeriod}\"" ) 
    549546 
    550547    # RabbitMQ message code 
     
    555552    fi 
    556553    # RabbitMQ message body 
    557     Body=$( echo "{\"code\":\"${code}\",\"uuid\":\"$(uuidgen)\",\"simuid\":\"${simuid}\",\"jobid\":\"${jobid}\",\"status\":\"OK\",\"out\":\"false\",\"nesting\":\"${IGCM_debug_LenStack}\",\"timestamp\":\"$( date +"%Y-%m-%d-%T-%N" )\"}" ) 
     554    Body=$( echo "{${GenericSimulationID},\"code\":\"${code}\",\"uuid\":\"$(uuidgen)\",\"status\":\"OK\",\"out\":\"false\",\"nesting\":\"${IGCM_debug_LenStack}\",\"timestamp\":\"$( date +"%Y-%m-%d-%T-%N" )\"}" ) 
    558555    # Fill the rabbitMQ queue (specifying config.card must be send) 
    559556    IGCM_debug_sendAMQP activate 
     
    603600      code=9999 
    604601      # RabbitMQ message body 
    605       Body=$( echo "{\"code\":\"${code}\",\"uuid\":\"$(uuidgen)\",\"simuid\":\"${simuid}\",\"jobid\":\"${jobid}\",\"status\":\"FATAL\",\"timestamp\":\"$( date +"%Y-%m-%d-%T-%N" )\"}" ) 
     602      Body=$( echo "{${GenericSimulationID},\"code\":\"${code}\",\"uuid\":\"$(uuidgen)\",\"status\":\"FATAL\",\"timestamp\":\"$( date +"%Y-%m-%d-%T-%N" )\"}" ) 
    606603      # Fill the rabbitMQ queue 
    607604      IGCM_debug_sendAMQP 
Note: See TracChangeset for help on using the changeset viewer.