Changeset 1048


Ignore:
Timestamp:
09/04/14 11:15:45 (10 years ago)
Author:
sdipsl
Message:

timestamp precision is now millisecond. Add a uuid to each message. see #207 and #214

Location:
trunk/libIGCM
Files:
2 edited

Legend:

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

    r1041 r1048  
    12411241      code=1100 
    12421242      # RabbitMQ message body 
    1243       Body=$( echo "{\"code\":\"${code}\",\"simuid\":\"${simuid}\",\"jobid\":\"${jobid}\",\"status\":\"OK\",\"timestamp\":\"$( date +"%Y-%m-%d-%T" )\"}" ) 
     1243      Body=$( echo "{\"code\":\"${code}\",\"uuid\":\"$(uuidgen)\",\"simuid\":\"${simuid}\",\"jobid\":\"${jobid}\",\"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}\",\"simuid\":\"${simuid}\",\"jobid\":\"${jobid}\",\"status\":\"OK\",\"timestamp\":\"$( date +"%Y-%m-%d-%T" )\"}" ) 
     1266        Body=$( echo "{\"code\":\"${code}\",\"uuid\":\"$(uuidgen)\",\"simuid\":\"${simuid}\",\"jobid\":\"${jobid}\",\"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

    r997 r1048  
    306306      code=2000 
    307307      # RabbitMQ message body 
    308       Body=$( echo "{\"code\":\"${code}\",\"simuid\":\"${simuid}\",\"jobid\":\"${jobid}\",\"nesting\":\"${IGCM_debug_LenStack}\",\"command\":\"${INPUTS[*]}\",\"timestamp\":\"$( date +"%Y-%m-%d-%T" )\"}" ) 
     308      Body=$( echo "{\"code\":\"${code}\",\"uuid\":\"$(uuidgen)\",\"simuid\":\"${simuid}\",\"jobid\":\"${jobid}\",\"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}\",\"simuid\":\"${simuid}\",\"jobid\":\"${jobid}\",\"status\":\"NOK\",\"out\":\"true\",\"nesting\":\"${IGCM_debug_LenStack}\",\"command\":\"${INPUTS[*]}\",\"timestamp\":\"$( date +"%Y-%m-%d-%T" )\"}" ) 
     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" )\"}" ) 
    504504        # Fill the rabbitMQ queue 
    505505        IGCM_debug_sendAMQP 
     
    512512        code=3000 
    513513        # RabbitMQ message body 
    514         Body=$( echo "{\"code\":\"${code}\",\"simuid\":\"${simuid}\",\"jobid\":\"${jobid}\",\"status\":\"OK\",\"out\":\"true\",\"nesting\":\"${IGCM_debug_LenStack}\",\"command\":\"${INPUTS[*]}\",\"timestamp\":\"$( date +"%Y-%m-%d-%T" )\"}" ) 
     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" )\"}" ) 
    515515        # Fill the rabbitMQ queue 
    516516        IGCM_debug_sendAMQP 
     
    555555    fi 
    556556    # RabbitMQ message body 
    557     Body=$( echo "{\"code\":\"${code}\",\"simuid\":\"${simuid}\",\"jobid\":\"${jobid}\",\"status\":\"OK\",\"out\":\"false\",\"nesting\":\"${IGCM_debug_LenStack}\",\"timestamp\":\"$( date +"%Y-%m-%d-%T" )\"}" ) 
     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" )\"}" ) 
    558558    # Fill the rabbitMQ queue (specifying config.card must be send) 
    559559    IGCM_debug_sendAMQP activate 
     
    603603      code=9999 
    604604      # RabbitMQ message body 
    605       Body=$( echo "{\"code\":\"${code}\",\"simuid\":\"${simuid}\",\"jobid\":\"${jobid}\",\"status\":\"FATAL\",\"timestamp\":\"$( date +"%Y-%m-%d-%T" )\"}" ) 
     605      Body=$( echo "{\"code\":\"${code}\",\"uuid\":\"$(uuidgen)\",\"simuid\":\"${simuid}\",\"jobid\":\"${jobid}\",\"status\":\"FATAL\",\"timestamp\":\"$( date +"%Y-%m-%d-%T-%N" )\"}" ) 
    606606      # Fill the rabbitMQ queue 
    607607      IGCM_debug_sendAMQP 
Note: See TracChangeset for help on using the changeset viewer.