Changeset 1285 for trunk/libIGCM/libIGCM_debug/libIGCM_debug.ksh
- Timestamp:
- 03/03/16 16:35:48 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_debug/libIGCM_debug.ksh
r1282 r1285 219 219 done 220 220 IGCM_debug_Print 2 "IGCM_debug_sendAMQP_Metrics " 221 echo ${encodedBody}|mailx -s "[TEMPORARY AMQP CHANNEL]" ${attachmentsOptions} ${mail_recipient} 222 fi 223 224 # Allways all good for now. 225 return 0 226 } 227 228 #D-#================================================================== 229 #D-function IGCM_debug_sendAMQP_projectAccounting 230 #D- * Purpose: Take over AMQP C client using mail as a message recipient 231 #D- * One argument : - File name where project accounting details are stored 232 #D- * Attach encoded accounting file. 233 234 function IGCM_debug_sendAMQP_projectAccounting { 235 236 typeset mail_recipient encodedBody 237 if [ X${ActivateBigBro} = Xtrue ] ; then 238 mail_recipient="superviseur@ipsl.jussieu.fr" 239 # Metrics tag on server side 240 code=7010 241 # Usual AMQP message to route messages on server side 242 encodedBody=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"msgUID\":\"$(uuidgen)\",\"accountingProject\":\"${PROJECT}\",\"centre\":\"${CENTER}\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" | base64 -w 0 ) 243 # send mail 244 attachmentsOptions="-a ${1}" 245 IGCM_debug_Print 2 "IGCM_debug_sendAMQP_projectAccounting" 221 246 echo ${encodedBody}|mailx -s "[TEMPORARY AMQP CHANNEL]" ${attachmentsOptions} ${mail_recipient} 222 247 fi … … 664 689 IGCM_debug_sendAMQP 665 690 fi 691 692 # Save project accounting details in a file 693 IGCM_sys_projectAccounting cpt_${CENTER}_${PROJECT}_$( date +"%Y%m%d_%H%M" ).dat 694 695 # And send it 696 IGCM_debug_sendAMQP_projectAccounting cpt_${CENTER}_${PROJECT}_$( date +"%Y%m%d_%H%M" ).dat 697 666 698 # Turn the flag on 667 699 ActivateBigBro=true
Note: See TracChangeset
for help on using the changeset viewer.