Ignore:
Timestamp:
01/06/16 16:44:30 (8 years ago)
Author:
sdipsl
Message:
  • workaround to avoid issues related to #275
File:
1 edited

Legend:

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

    r1268 r1275  
    160160    status=$? 
    161161    # 
    162     if [ ${status} -gt 0 ] ; then 
    163       IGCM_debug_Exit "IGCM_debug_send_AMQP_msg__MAILTUNNEL" 
    164     fi 
    165     secondsSinceLastMail=$(( $(date +%s) - ${secondsBetweenRefAndLastMail} )) 
    166     # send message when exceeding threshold 
    167     [ ${secondsSinceLastMail} -gt ${mail_frequency} ] && send_messages=1 
     162    # Only execute this block when the stat command succeeded. 
     163    # The stat command might fail in some circumstance but we consider it is ok to continue anyway. 
     164    if [ ${status} -eq 0 ] ; then 
     165      secondsSinceLastMail=$(( $(date +%s) - ${secondsBetweenRefAndLastMail} )) 
     166      # send message when exceeding threshold 
     167      [ ${secondsSinceLastMail} -gt ${mail_frequency} ] && send_messages=1 
     168    fi 
    168169  fi 
    169170 
Note: See TracChangeset for help on using the changeset viewer.