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.26 by spiga, Tue May 26 16:53:23 2009 UTC vs.
Revision 1.30 by ewv, Wed Dec 16 17:40:08 2009 UTC

# Line 11 | Line 11 | from crab_exceptions import CrabExceptio
11   import common
12   import os
13   import socket
14 < import sha
14 >
15 > # FUTURE: for python 2.4 & 2.6
16 > try:
17 >    from hashlib import sha1
18 > except:
19 >    from sha import sha as sha1
20  
21   class SchedulerCondor(SchedulerLocal) :
22      """
# Line 68 | Line 73 | class SchedulerCondor(SchedulerLocal) :
73          return
74  
75      def envUniqueID(self):
76 <        taskHash = sha.new(common._db.queryTask('name')).hexdigest()
76 >        taskHash = sha1(common._db.queryTask('name')).hexdigest()
77          id = "https://" + socket.gethostname() + '/' + taskHash + "/${NJob}"
78          return id
79  
# Line 76 | Line 81 | class SchedulerCondor(SchedulerLocal) :
81          """
82          Return scheduler-specific parameters
83          """
84 +        req = ''
85 +        if self.EDG_addJdlParam:
86 +            if self.EDG_addJdlParam[-1] == '':
87 +                self.EDG_addJdlParam = self.EDG_addJdlParam[:-1]
88 +            for p in self.EDG_addJdlParam:
89 +                req += p.strip()+';\n'
90  
91 <        index = int(common._db.nJobs()) - 1
81 <        schedParam = ''
82 <
83 <        for i in range(index):
84 <            pass
85 <
86 <        return schedParam
91 >        return req
92  
93  
94      def realSchedParams(self, cfg_params):
# Line 175 | Line 180 | fi
180   """
181  
182          return txt
183 +
184 +
185 +    def sched_fix_parameter(self):
186 +        """
187 +        Returns string with requirements and scheduler-specific parameters
188 +        """
189 +
190 +        if self.EDG_requirements:
191 +            req = self.EDG_requirements
192 +            taskReq = {'commonRequirements':req}
193 +            common._db.updateTask_(taskReq)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines