196 |
|
common.bossSession.getRunningInstance(task.jobs[i]) |
197 |
|
lines.append(task.jobs[i].runningJob[attr]) |
198 |
|
return lines |
199 |
+ |
|
200 |
+ |
def queryDistJob(self, attr): |
201 |
+ |
''' |
202 |
+ |
Returns the list of distinct value for a given job attributes |
203 |
+ |
''' |
204 |
+ |
distAttr=[] |
205 |
+ |
task = common.bossSession.loadJobDistAttr( 1, attr ) |
206 |
+ |
for i in task: distAttr.append(i[attr]) |
207 |
+ |
return distAttr |
208 |
+ |
|
209 |
+ |
def queryAttrJob(self, attr, field): |
210 |
+ |
''' |
211 |
+ |
Returns the list of jobs matching the given attribute |
212 |
+ |
''' |
213 |
+ |
matched=[] |
214 |
+ |
task = common.bossSession.loadJobsByAttr(attr ) |
215 |
+ |
for i in task: |
216 |
+ |
matched.append(i[field]) |
217 |
+ |
return matched |
218 |
+ |
|