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.70 by farinafa, Fri Feb 26 17:48:28 2010 UTC vs.
Revision 1.71 by farinafa, Thu Apr 29 12:44:20 2010 UTC

# Line 401 | Line 401 | class DBinterface:
401                  job.runningJob['state'] = str( rForJ.getAttribute('action') )
402            
403                  # Needed for unique naming of the output.
404 <                # GIVES PROBLEMS. FIX in >=2_7_2    
405 <                #job.runningJob['submission'] =  str(rForJ.getAttribute('submission'))
404 >                job['arguments'] = "%d %s"%(job.runningJob['jobId'], str(rForJ.getAttribute('submission')).strip() )
405            
406          common.bossSession.updateDB( task_new )
407          return
# Line 414 | Line 413 | class DBinterface:
413                  return False
414          return True
415  
416 <    # Method to update arguments w.r.t. resubmission number in order to grant unique output
416 >    # Method to update arguments w.r.t. resubmission number in order to grant unique output
417      def updateResubAttribs(self, jobsL):
418          task = self.getTask(jobsL)
419          for j in task.jobs:
420 <            newArgs = "%d %d"%(j['jobId'], j['submissionNumber'])
420 >            common.bossSession.getRunningInstance(j)
421 >            try:
422 >                resubNum = int(str(j['arguments']).split(' ')[1]) + 1
423 >            except Exception, e:
424 >                resubNum = j.runningJob['submission']
425 >            newArgs = "%d %d"%(j.runningJob['jobId'], resubNum)
426              j['arguments'] = newArgs
423            
424        common.bossSession.updateDB(task)
425        return
427  
428 +        common.bossSession.updateDB(task)
429 +        return
430  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines