Package Ganga :: Package Core :: Package JobRepository :: Module TestRepository :: Class TestRepository
[hide private]
[frames] | no frames]

Class TestRepository

source code

        object --+    
                 |    
Base.JobRepository --+
                     |
                    TestRepository

Instance Methods [hide private]
 
__init__(self, schema, role, streamer, root_dir, **kwds)
schema is a subset of job schema.
source code
 
registerJobs(self, jobs)
registerJobs(self, jobs) --> None throws RepositoryError jobs -- list of jobs to register
source code
 
commitJobs(self, jobs)
commitJobs(self, jobs) --> None throws RepositoryError jobs -- list of jobs to commit jobs must already be registered
source code
 
checkoutJobs(self, ids_or_attributes)
checkoutJobs(self, ids_or_attributes) --> list of jobs throws RepositoryError ids_or_attributes -- list of job ids or dictionary of job attributes saved in the DB as metadata.
source code
 
deleteJobs(self, ids)
deleteJob(self, ids) --> None throws RepositoryError ids -- list of job ids
source code
 
getJobIds(self, ids_or_attributes)
getJobIds(self, ids_or_attributes) --> list of ids for the jobs having specified attributes.
source code
 
getJobAttributes(self, ids_or_attributes)
getJobAttributes(self, ids_or_attributes) --> list of dictionaries with job metadata stored in the registry.
source code
 
setJobsStatus(self, statusList)
setJobsStatus(self, statusList) --> None throws RepositoryError statusList -- list of tuples (<jobId>, <status>) Supposed to be used by JobManager
source code
 
getJobsStatus(self, ids_or_attributes)
getJobsStatus(self, ids_or_attributes) --> list of tuples, indicating jobid and job status: (id, status).
source code

Inherited from Base.JobRepository: getJobTree, setJobTree

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, schema, role, streamer, root_dir, **kwds)
(Constructor)

source code 

schema is a subset of job schema. It should be list of tuples (attr, dbtype), where attr is a name of attribute, and dbtype is database specific type. role can be 'Client' or 'JobManager'. 'Client' can only modify job status of 'new' jobs streamer is an object which converts job dictionary into a string and vice versa. tree_streamer is an object which converts jobtree into a string and vice versa.

Overrides: object.__init__
(inherited documentation)

registerJobs(self, jobs)

source code 

registerJobs(self, jobs) --> None throws RepositoryError jobs -- list of jobs to register

Overrides: Base.JobRepository.registerJobs
(inherited documentation)

commitJobs(self, jobs)

source code 

commitJobs(self, jobs) --> None throws RepositoryError jobs -- list of jobs to commit jobs must already be registered

Overrides: Base.JobRepository.commitJobs

checkoutJobs(self, ids_or_attributes)

source code 

checkoutJobs(self, ids_or_attributes) --> list of jobs throws RepositoryError ids_or_attributes -- list of job ids or dictionary of job attributes saved in the DB as metadata. Example of attributes: attributes = {'status':'submitted', 'application':'DaVinci'}

Overrides: Base.JobRepository.checkoutJobs

deleteJobs(self, ids)

source code 

deleteJob(self, ids) --> None throws RepositoryError ids -- list of job ids

Overrides: Base.JobRepository.deleteJobs

getJobIds(self, ids_or_attributes)

source code 

getJobIds(self, ids_or_attributes) --> list of ids for the jobs having specified attributes. throws RepositoryError ids_or_attributes -- list of job ids or dictionary of job attributes saved in the DB as metadata. Example of attributes: attributes = {'status':'submitted', 'application':'DaVinci'}

Overrides: Base.JobRepository.getJobIds

getJobAttributes(self, ids_or_attributes)

source code 

getJobAttributes(self, ids_or_attributes) --> list of dictionaries with job metadata stored in the registry. throws RepositoryError ids_or_attributes -- list of job ids or dictionary of job attributes saved in the DB as metadata. Example of attributes: attributes = {'status':'submitted', 'application':'DaVinci'}

Overrides: Base.JobRepository.getJobAttributes

setJobsStatus(self, statusList)

source code 

setJobsStatus(self, statusList) --> None throws RepositoryError statusList -- list of tuples (<jobId>, <status>) Supposed to be used by JobManager

Overrides: Base.JobRepository.setJobsStatus

getJobsStatus(self, ids_or_attributes)

source code 

getJobsStatus(self, ids_or_attributes) --> list of tuples, indicating jobid and job status: (id, status). throws RepositoryError ids_or_attributes -- list of job ids or dictionary of job attributes saved in the DB as metadata. Example of attributes: attributes = {'application':'DaVinci'}

Overrides: Base.JobRepository.getJobsStatus