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

Comparing COMP/CRAB/python/SchedulerCondor.py (file contents):
Revision 1.24 by ewv, Tue May 5 15:01:03 2009 UTC vs.
Revision 1.29 by ewv, Wed Dec 16 17:37:28 2009 UTC

# Line 11 | Line 11 | from crab_exceptions import CrabExceptio
11   import common
12   import os
13   import socket
14 < import sha
14 > try:
15 >    from hashlib import sha1
16 > except:
17 >    from sha import sha as sha1
18  
19   class SchedulerCondor(SchedulerLocal) :
20      """
# Line 55 | Line 58 | class SchedulerCondor(SchedulerLocal) :
58          self.copy_data   = cfg_params.get("USER.copy_data", 0)
59  
60          self.proxyValid = 0
61 <        self.dontCheckProxy = int(cfg_params.get("EDG.dont_check_proxy", 0))
62 <        self.proxyServer = cfg_params.get("EDG.proxy_server", 'myproxy.cern.ch')
63 <        common.logger.debug(5,'Setting myproxy server to ' + self.proxyServer)
64 <
65 <        self.group = cfg_params.get("EDG.group", None)
66 <        self.role  = cfg_params.get("EDG.role", None)
67 <        self.VO    = cfg_params.get('EDG.virtual_organization', 'cms')
61 >        self.dontCheckProxy = int(cfg_params.get("GRID.dont_check_proxy", 0))
62 >        self.proxyServer = cfg_params.get("GRID.proxy_server", 'myproxy.cern.ch')
63 >        common.logger.debug('Setting myproxy server to ' + self.proxyServer)
64 >
65 >        self.group = cfg_params.get("GRID.group", None)
66 >        self.role  = cfg_params.get("GRID.role", None)
67 >        self.VO    = cfg_params.get('GRID.virtual_organization', 'cms')
68  
69          self.checkProxy()
70  
71          return
72  
73      def envUniqueID(self):
74 <        taskHash = sha.new(common._db.queryTask('name')).hexdigest()
74 >        taskHash = sha1(common._db.queryTask('name')).hexdigest()
75          id = "https://" + socket.gethostname() + '/' + taskHash + "/${NJob}"
76          return id
77  
# Line 76 | Line 79 | class SchedulerCondor(SchedulerLocal) :
79          """
80          Return scheduler-specific parameters
81          """
82 +        req = ''
83 +        if self.EDG_addJdlParam:
84 +            if self.EDG_addJdlParam[-1] == '':
85 +                self.EDG_addJdlParam = self.EDG_addJdlParam[:-1]
86 +            for p in self.EDG_addJdlParam:
87 +                req += p.strip()+';\n'
88  
89 <        index = int(common._db.nJobs()) - 1
81 <        schedParam = ''
82 <
83 <        for i in range(index):
84 <            pass
85 <
86 <        return schedParam
89 >        return req
90  
91  
92      def realSchedParams(self, cfg_params):
# Line 175 | Line 178 | fi
178   """
179  
180          return txt
181 +
182 +
183 +    def sched_fix_parameter(self):
184 +        """
185 +        Returns string with requirements and scheduler-specific parameters
186 +        """
187 +
188 +        if self.EDG_requirements:
189 +            req = self.EDG_requirements
190 +            taskReq = {'commonRequirements':req}
191 +            common._db.updateTask_(taskReq)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines