Package Ganga :: Package Lib :: Package MonitoringServices :: Package ARDADashboard :: Package LCG :: Module ARDADashboardLCGExecutable
[hide private]
[frames] | no frames]

Source Code for Module Ganga.Lib.MonitoringServices.ARDADashboard.LCG.ARDADashboardLCGExecutable

 1  from Ganga.Lib.MonitoringServices.ARDADashboard.LCG.ARDADashboardLCG import ARDADashboardLCG 
 2  from types import DictionaryType, IntType 
 3   
4 -class ARDADashboardLCGExecutable(ARDADashboardLCG):
5 6 application = 'unknown' 7 applicationVersion = 'unknown' 8 dataset = 'unknown' 9 activity = 'unknown' 10
11 - def __init__(self, job_info):
12 13 ARDADashboardLCG.__init__(self, job_info) 14 if self._complete == False: 15 return 16 17 self._complete = False 18 if type(job_info) is DictionaryType: 19 # we are on the worker node 20 try: 21 self._complete = True 22 except KeyError,msg: 23 return 24 25 else: 26 # we are on the client. We get the info from the job_info 27 # (which is a job) 28 29 self._complete = True
30
31 - def getSandboxModules(self):
34
35 - def submit(self, **opts):
36 37 if self._complete: 38 try: 39 self.dashboard.sendValues(message = { 40 'Application':self.application, 41 'ApplicationVersion':self.applicationVersion, 42 'DatasetName':self.dataset, 43 'GridJobID':self.gridJobId, 44 'GridUser':self.gridCertificate, 45 'JSTool':'ganga', 46 'Scheduler':self.gridBackend, 47 'TaskType':self.activity, 48 'VO':self.VO 49 }, 50 jobId=self.gangaJobId + '_' + self.gridJobId, 51 taskId=self.gangaTaskId 52 ) 53 except Exception,msg: 54 self._logger.debug('could not send monalisa message: %s' % msg)
55