ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/DBinterface.py
(Generate patch)

Comparing COMP/CRAB/python/DBinterface.py (file contents):
Revision 1.28 by farinafa, Tue May 20 16:59:51 2008 UTC vs.
Revision 1.32 by spiga, Wed May 28 12:04:38 2008 UTC

# Line 177 | Line 177 | class DBinterface:
177          """
178          task = self.getTask(jobs)
179  
180        Jobs = task.getJobs()
180          print "--------------------------"
181 <        for Job in Jobs:
181 >        for Job in task.jobs:
182              print "Id: ",Job['jobId']
183              print "Dest: ", Job['dlsDestination']
184              print "Output: ", Job['outputFiles']
185              print "Args: ",Job['arguments']
186 +            print "Service: ",Job.runningJob['service']
187              print "--------------------------"
188          return      
189  
# Line 330 | Line 330 | class DBinterface:
330  
331              # Data alignment
332              jobStatus = str(job.runningJob['statusScheduler'])
333 <            if rForJ.getAttribute('status') not in ['Created', 'Submitting', 'Unknown'] and \
333 >            if rForJ.getAttribute('statusScheduler') not in ['Created', 'Submitting', 'Unknown'] and \
334                       job.runningJob['statusScheduler'] != 'Cleared':
335                  job.runningJob['statusScheduler'] = str( rForJ.getAttribute('status') )
336                  jobStatus = str(job.runningJob['statusScheduler'])
# Line 352 | Line 352 | class DBinterface:
352              # TODO cleared='0' field, how should it be handled/mapped in BL? #Fabio
353  
354          common.bossSession.updateDB( task )
355
355          return
356  
357      # FIXME temporary method to verify what kind of submission to perform towards the server
358      def checkIfNeverSubmittedBefore(self):
359          for j in self.getTask().jobs:
360 <            if j.runningJob['submission'] > 1 or j.runningJob['status'] != 'C':
360 >            if j.runningJob['submission'] > 1 or j.runningJob['status'] != 'C' or \
361 >                    j.runningJob['statusScheduler'] != 'Created':
362                  return False
363          return True
364  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines