Package Ganga :: Package GPIDev :: Package Lib :: Package Registry :: Module JobRegistry' :: Class JobRegistrySliceProxy
[hide private]
[frames] | no frames]

Class JobRegistrySliceProxy

source code

                           object --+    
                                    |    
RegistrySliceProxy.RegistrySliceProxy --+
                                        |
                                       JobRegistrySliceProxy

This object is an access list of jobs defined in Ganga.

The 'jobs' represents all existing jobs.

A subset of jobs may be created by slicing (e.g. jobs[-10:] last ten jobs) or select (e.g. jobs.select(status='new') or jobs.select(10,20) jobs with ids between 10 and 20). A new access list is created as a result of slice/select. The new access list may be further restricted.

This object allows to perform collective operations listed below such as kill or submit on all jobs in the current range. The keep_going=True (default) means that the operation will continue despite possible errors until all jobs are processed. The keep_going=False means that the operation will bail out with an Exception on a first encountered error.

Instance Methods [hide private]
 
__call__(self, x)
Access individual job.
source code
 
__getitem__(self, x)
Get a job by positional index.
source code
 
__getslice__(self, i1, i2)
Get a slice.
source code
 
copy(self, keep_going=True)
Copy all jobs.
source code
 
fail(self, keep_going=True, force=False)
Fail all jobs.
source code
 
force_status(self, status, keep_going=True, force=False)
Force status of all jobs to 'completed' or 'failed'.
source code
 
kill(self, keep_going=True)
Kill all jobs.
source code
 
remove(self, keep_going=True, force=False)
Remove all jobs.
source code
 
resubmit(self, keep_going=True)
Resubmit all jobs.
source code
 
submit(self, keep_going=True)
Submit all jobs.
source code

Inherited from RegistrySliceProxy.RegistrySliceProxy: __contains__, __init__, __iter__, __len__, __str__, clean, ids, incomplete_ids, select

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__call__(self, x)
(Call operator)

source code 

Access individual job. Examples: jobs(10) : get job with id 10 or raise exception if it does not exist. jobs((10,2)) : get subjobs number 2 of job 10 if exist or raise exception. jobs('10.2')) : same as above

__getitem__(self, x)
(Indexing operator)

source code 

Get a job by positional index. Examples: jobs[-1] : get last job, jobs[0] : get first job, jobs[1] : get second job.

__getslice__(self, i1, i2)
(Slicling operator)

source code 

Get a slice. Examples: jobs[2:] : get first two jobs, jobs[-10:] : get last 10 jobs.