Changeset 997
- Timestamp:
- 03/04/14 15:42:09 (10 years ago)
- Location:
- trunk/libIGCM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_config/libIGCM_config.ksh
r985 r997 1319 1319 [ X${JobType} = XRUN ] && IGCM_sys_RmRunDir -rf ${RUN_DIR_PATH} 1320 1320 1321 # To be sure we flush message buffer before exiting the job 1322 FlushAMQP=TRUE 1323 1321 1324 IGCM_debug_PopStack "IGCM_config_Finalize" 1322 1325 } -
trunk/libIGCM/libIGCM_debug/libIGCM_debug.ksh
r996 r997 170 170 if [ ! -f "${last_mail_date__file}" ]; then 171 171 # if we are here, it means no mail has been sent yet 172 if [ ${messages_count} -gt 0 ]; then 173 # send the first mail 174 send_messages=1 175 fi 172 # send the first mail 173 [ ${messages_count} -gt 0 ] && send_messages=1 176 174 else 177 175 # compute last time the file was changed (in seconds) 178 176 seconds_since_last_mail=$(( $(date +%s) - $(stat -c %Y ${last_mail_date__file}) )) 179 180 if [ ${seconds_since_last_mail} -gt ${mail_frequency} ]; then 181 send_messages=1 182 fi 183 fi 184 185 # send mail / add message in buffer 186 if [ ${send_messages} -eq 1 ]; then 177 # send message when exceeding threshold 178 [ ${seconds_since_last_mail} -gt ${mail_frequency} ] && send_messages=1 179 fi 180 181 # queue messages in the buffer 182 echo ${b64_encoded_msg} >> ${buffer} 183 184 # send mail 185 if ( [ ${send_messages} -eq 1 ] || [ X${FlushAMQP} = XTRUE ] ) ; then 187 186 mail -s "[TEMPORARY AMQP CHANNEL]" ${mail_recipient} < ${buffer} # send buffer 188 187 rm -f $buffer ; touch ${buffer} # clear buffer 189 188 touch ${last_mail_date__file} # memorize last mail date 190 else191 echo ${b64_encoded_msg} >> ${buffer}192 189 fi 193 190
Note: See TracChangeset
for help on using the changeset viewer.