Changeset 920


Ignore:
Timestamp:
08/13/13 15:11:42 (11 years ago)
Author:
sdipsl
Message:

factorization

File:
1 edited

Legend:

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

    r911 r920  
    12311231  if ( $DEBUG_debug ) ; then 
    12321232    # Inform the rabbitMQ queue 
    1233  
    1234     # TO BE A FUNCTION BEGIN # 
    1235  
    12361233    if [ X${ActivateBigBro} = Xtrue ] ; then 
    1237       # Only cosmetics 
    1238       decal=0 
    1239       while [ ${decal} -lt ${IGCM_debug_LenStack} ]; do 
    1240         printf ' ' >> ${StackFileLocation}/stack 
    1241         (( decal = decal + 1 )) 
    1242       done 
    1243       # RabbitMQ message 
     1234      # RabbitMQ message code 
    12441235      code=1100 
    1245       # 
     1236      # RabbitMQ message body 
    12461237      Body=$( echo "{\"code\":\"${code}\",\"simuid\":\"${simuid}\",\"jobid\":\"${jobid}\",\"status\":\"OK\",\"timestamp\":\"$( date +"%Y-%m-%d-%T" )\"}" ) 
    1247       encodedBody=$( echo "${Body}" | base64 -w 0 ) 
    1248       # 
    1249       #sendAMQPMsg -h localhost -p 5672 -f ${SUBMIT_DIR}/config.card -b ${encodedBody} 
    1250       echo sendAMQPMsg -h localhost -p 5672 -b "${Body}"      >> ${StackFileLocation}/stack 
    1251       echo sendAMQPMsg -h localhost -p 5672 -b ${encodedBody} >> /tmp/send.AMQP.${jobid}.history.txt 
    1252       sendAMQPMsg -h localhost -p 5672 -b ${encodedBody} 
    1253       status=$? 
    1254       if [ ${status} -gt 0 ] ; then 
    1255         IGCM_debug_Print 2 "IGCM_debug_PopStack : command sendAMQPMsg failed error code ${status}" 
    1256         echo  sendAMQPMsg -h localhost -p 5672 -b "${Body}" 
    1257         exit 
    1258       fi 
    1259     fi 
    1260  
    1261     # TO BE A FUNCTION END # 
    1262  
     1238      # Fill the rabbitMQ queue 
     1239      IGCM_debug_sendAMQP 
     1240    fi 
    12631241  fi 
    12641242 
     
    12701248    # Mail notification 
    12711249    IGCM_sys_SendMail 
    1272  
    12731250    # 
    12741251    IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Configuration PeriodState "Completed" 
     1252    # 
    12751253    IGCM_debug_Print 1 "Normal End of computation." 
    12761254 
    12771255    if ( $DEBUG_debug ) ; then 
    1278       # Inform the rabbitMQ queue 
    1279  
    1280       # TO BE A FUNCTION BEGIN # 
    1281  
    12821256      if [ X${ActivateBigBro} = Xtrue ] ; then 
    1283         # Only cosmetics 
    1284         decal=0 
    1285         while [ ${decal} -lt ${IGCM_debug_LenStack} ]; do 
    1286           printf ' ' >> ${StackFileLocation}/stack 
    1287           (( decal = decal + 1 )) 
    1288         done 
    1289         # RabbitMQ message 
     1257        # RabbitMQ message code 
    12901258        code=0100 
    1291         # 
     1259        # RabbitMQ message body 
    12921260        Body=$( echo "{\"code\":\"${code}\",\"simuid\":\"${simuid}\",\"jobid\":\"${jobid}\",\"status\":\"OK\",\"timestamp\":\"$( date +"%Y-%m-%d-%T" )\"}" ) 
    1293         encodedBody=$( echo "${Body}" | base64 -w 0 ) 
    1294         # 
    1295         #sendAMQPMsg -h localhost -p 5672 -f ${SUBMIT_DIR}/config.card -b ${encodedBody} 
    1296         echo sendAMQPMsg -h localhost -p 5672 -b "${Body}"      >> ${StackFileLocation}/stack 
    1297         echo sendAMQPMsg -h localhost -p 5672 -b ${encodedBody} >> /tmp/send.AMQP.${jobid}.history.txt 
    1298         sendAMQPMsg -h localhost -p 5672 -b ${encodedBody} 
    1299         status=$? 
    1300         if [ ${status} -gt 0 ] ; then 
    1301           IGCM_debug_Print 2 "IGCM_debug_PopStack : command sendAMQPMsg failed error code ${status}" 
    1302           echo  sendAMQPMsg -h localhost -p 5672 -b "${Body}" 
    1303           exit 
    1304         fi 
     1261        # Fill the rabbitMQ queue 
     1262        IGCM_debug_sendAMQP 
    13051263      fi 
    1306  
    1307       # TO BE A FUNCTION END # 
    1308  
    13091264      echo 
    13101265      IGCM_debug_Print 1 "Your files on ${R_SAVE} :" 
Note: See TracChangeset for help on using the changeset viewer.