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

Comparing COMP/CRAB/python/Resubmitter.py (file contents):
Revision 1.16 by spiga, Mon Jun 15 09:35:06 2009 UTC vs.
Revision 1.17 by spiga, Tue Oct 13 08:22:39 2009 UTC

# Line 2 | Line 2 | from Submitter import Submitter
2   import common
3   from crab_util import *
4   from crab_exceptions import *
5 + from PhEDExDatasvcInfo import PhEDExDatasvcInfo
6 +
7  
8   class Resubmitter(Submitter):
9      def __init__(self, cfg_params, jobs):
# Line 9 | Line 11 | class Resubmitter(Submitter):
11  
12          nj_list = []
13  
14 +        self.copy_data = int(cfg_params.get('USER.copy_data',0))
15 +        self.check_RemoteDir =  int(cfg_params.get('USER.check_user_remote_dir',0))
16          nj_list = self.checkAllowedJob(jobs,nj_list)
13
17          common.logger.info('Jobs '+str(nj_list)+' will be resubmitted')
18          Submitter.__init__(self, cfg_params, nj_list, 'range')
19  
20          return
21  
22 +    def checkRemoteDir(self,task):
23 +
24 +        if self.copy_data==1:
25 +            stageout = PhEDExDatasvcInfo(self.cfg_params)
26 +            endpoint, lfn, SE, SE_PATH, user = stageout.getEndpoint()
27 +            common.scheduler.checkRemoteDir(endpoint,eval(task['outfileBasename']))
28 +
29 +
30      def checkAllowedJob(self,jobs,nj_list):
31          listRunField=[]
21
32          task=common._db.getTask(jobs)
33 +        if self.check_RemoteDir == 1 : self.checkRemoteDir(task)
34          for job in task.jobs:
35              st = job.runningJob['state']
36              nj = int(job['jobId'])

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines