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

Comparing COMP/CRAB/python/DBinterface.py (file contents):
Revision 1.2 by spiga, Tue Mar 4 15:50:44 2008 UTC vs.
Revision 1.3 by spiga, Wed Mar 5 10:15:00 2008 UTC

# Line 196 | Line 196 | class DBinterface:
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 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines