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.43 by spiga, Mon Aug 25 13:45:41 2008 UTC vs.
Revision 1.48 by spiga, Mon Nov 10 13:30:23 2008 UTC

# Line 56 | Line 56 | class DBinterface:
56          Return task with all/list of jobs
57          """
58          try:
59 <            task = common.bossSession.load(1,jobsList)[0]
59 >            task = common.bossSession.load(1,jobsList)
60          except Exception, e :
61              common.logger.debug(3, "Error while getting task : " +str(traceback.format_exc()))
62              raise CrabException('Error while getting task '+str(e))
# Line 67 | Line 67 | class DBinterface:
67          Return a task with a single job
68          """
69          try:
70 <            task = common.bossSession.load(1,str(n))[0]
70 >            task = common.bossSession.load(1,str(n))
71          except Exception, e :
72              common.logger.debug(3, "Error while getting job : " +str(traceback.format_exc()))
73              raise CrabException('Error while getting job '+str(e))
# Line 334 | Line 334 | class DBinterface:
334                      rForJ = r
335                      break
336              ## Check the submission number and create new running jobs on the client side          
337 <            if rForJ.getAttribute('resubmit') != 'None' :
337 >            if rForJ.getAttribute('resubmit') != 'None' and (rForJ.getAttribute('status') not in ['Killed','Done','Done (Failed)']) :
338                  if int(job.runningJob['submission']) < int(rForJ.getAttribute('resubmit')) + 1:
339                      nj_list.append(id)
340 <                    self.newRunJobs(nj_list)
340 >            if len(nj_list) > 0: self.newRunJobs(nj_list)
341  
342          task_new = self.getTask()
343  
# Line 351 | Line 351 | class DBinterface:
351                      break
352                    
353              # Data alignment
354 <            if rForJ.getAttribute('status') not in ['Created', 'Unknown'] and not\
355 <                (job.runningJob['statusScheduler'] == 'Killing' and rForJ.getAttribute('status')!='Killed') \
356 <                and not  (job.runningJob['statusScheduler'] in 'Submitting'  and rForJ.getAttribute('status') in ['Killed','Cleared'])  :
354 >            if rForJ.getAttribute('status') not in ['Created', 'Unknown']:
355                     # update the status  
356                  common.logger.debug(3,"Updating DB status for job: " + str(id) + " @: " \
357                                        + str(rForJ.getAttribute('status')) )

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines