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

Comparing COMP/CRAB/python/SchedulerGlite.py (file contents):
Revision 1.2 by spiga, Fri Oct 6 16:29:12 2006 UTC vs.
Revision 1.3 by slacapra, Mon Oct 9 15:30:41 2006 UTC

# Line 10 | Line 10 | import os, sys, time
10  
11   class SchedulerGlite(SchedulerEdg):
12      def __init__(self):
13 <            SchedulerEdg.__init__(self)
13 >        SchedulerEdg.__init__(self)
14 >
15      def sched_parameter(self):
16          """
17          Returns file with requirements and scheduler-specific parameters
# Line 76 | Line 77 | class SchedulerGlite(SchedulerEdg):
77              param_file = open(common.work_space.shareDir()+'/'+self.param, 'w')
78  
79              itr4=self.findSites_(first[i])
80 <            if (itr4 != []):
81 <                req1=[]  
82 <                j = 0
83 <                concString = '||'
84 <                for arg in itr4:
85 <                    print "ITR: ", arg
86 <                    #############
87 <                    # MC Changed matching syntax to avoid gang matching
88 <                    #############
89 <                    req1.append(' Member("'+arg+'" , other.GlueCESEBindGroupSEUniqueID) ')
90 <            param_file.write('Requirements = ' + req + " && (" + concString.join(req1) + ');\n')  
80 >            req1=[]  
81 >            j = 0
82 >            concString = '||'
83 >            for arg in itr4:
84 >                #############
85 >                # MC Changed matching syntax to avoid gang matching
86 >                #############
87 >                req1.append(' Member("'+arg+'" , other.GlueCESEBindGroupSEUniqueID) ')
88 >            if len(req1): req = req + " && (" + concString.join(req1) + ')'
89 >            req = req + ';\n'
90 >            param_file.write('Requirements = ' + req )
91    
92              if (self.edg_config and self.edg_config_vo != ''):
93                  param_file.write('RBconfig = "'+self.edg_config+'";\n')  
# Line 238 | Line 239 | class SchedulerGlite(SchedulerEdg):
239          return cmd_out
240  
241      def findSites_(self, n):
241        itr4 =[]
242          sites = common.jobDB.destination(n)
243 <        if len(sites)>0 and sites[0]=="Any":
244 <            return itr4
245 <        if sites != [""]:
246 <            return sites
243 >        if len(sites)>0 and sites[0]=="":
244 >            return []
245 >        return sites

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines