46 |
|
self.task = common.bossSession.loadTaskByID(1) |
47 |
|
return self.task |
48 |
|
|
49 |
+ |
def getJob(self, n): |
50 |
+ |
|
51 |
+ |
self.job = common.bossSession.loadJobByID(1,n) |
52 |
+ |
return self.job |
53 |
|
|
54 |
|
|
55 |
|
def createTask_(self, optsToSave): |
56 |
|
""" |
57 |
|
Task declaration |
58 |
|
with the first coniguration stuff |
59 |
< |
{'server_name': 'crabas.lnl.infn.it/data1/cms/', '-scheduler': 'glite', '-jobtype': 'cmssw', '-server_mode': '0'} |
59 |
> |
{'server_name': 'crabas.lnl.infn.it/data1/cms/', '-scheduler': 'glite', '-jobtype': 'cmssw', '-server_mode': '0'} |
60 |
|
|
61 |
|
""" |
62 |
|
opt={} |
63 |
< |
if optsToSave['server_mode'] == 1: opt['serverName']=optsToSave['server_name'] |
63 |
> |
opt['serverName']=optsToSave.get('server_name',0) |
64 |
|
opt['jobType']=optsToSave['jobtype'] |
65 |
|
opt[ 'name']=common.work_space.taskName() |
66 |
|
task = Task( opt ) |
90 |
|
jobs = [] |
91 |
|
for id in range(nj): |
92 |
|
parameters = {} |
93 |
< |
parameters['name'] = 'job' + str(id) |
93 |
> |
parameters['name'] = id |
94 |
|
job = Job(parameters) |
95 |
|
jobs.append(job) |
96 |
|
task.addJobs(jobs) |
220 |
|
Returns the list of distinct value for a given job attributes |
221 |
|
''' |
222 |
|
distAttr=[] |
223 |
< |
task = common.bossSession.loadJobDistAttr_Attr( 1, attr_1, attr_2, list ) |
223 |
> |
task = common.bossSession.loadJobDistAttr( 1, attr_1, attr_2, list ) |
224 |
|
for i in task: distAttr.append(i[attr_1]) |
225 |
|
return distAttr |
226 |
+ |
|
227 |
|
def queryAttrJob(self, attr, field): |
228 |
|
''' |
229 |
|
Returns the list of jobs matching the given attribute |