Package Ganga :: Package Lib :: Package MonitoringServices :: Package MSGMS :: Module AthenaMSGMS
[hide private]
[frames] | no frames]

Source Code for Module Ganga.Lib.MonitoringServices.MSGMS.AthenaMSGMS

 1  from Ganga.Lib.MonitoringServices.MSGMS.MSGMS import MSGMS 
 2  import cPickle as pickle 
 3   
 4  # TODO: move this into GangaAtlas 
 5   
6 -class AthenaMSGMS(MSGMS):
7
8 - def __init__(self, job_info, config_info):
9 MSGMS.__init__(self, job_info, config_info)
10
11 - def getSandboxModules(self):
16
17 - def stop(self, exitcode, **opts):
18 # create message as in MSGMS 19 if exitcode == 0: 20 event = "finished" 21 else: 22 event = "failed" 23 message = self.getMessage(event) 24 # add UAT09 properties to message 25 import os 26 message['uat09.ls'] = os.listdir('.') 27 message['uat09.env'] = os.environ 28 try: 29 f = open('stats.pickle','r') 30 stats = pickle.load(f) 31 f.close() 32 message['uat09.Athena.stats'] = stats 33 except: 34 pass 35 for x in ('input_files','input_guids','athena_options','output_files','output_data','output_guids','output_location'): 36 try: 37 f = open(x,'r') 38 y = ','.join([l.strip() for l in f]) 39 f.close() 40 message['uat09.Athena.%s'%x] = y 41 except: 42 pass 43 # send message 44 self.send(message)
45