Package Ganga :: Package GPIDev :: Package Lib :: Package Tasks :: Module TaskRegistry' :: Class TaskRegistrySliceProxy
[hide private]
[frames] | no frames]

Class TaskRegistrySliceProxy

source code

                                    object --+    
                                             |    
Registry.RegistrySliceProxy.RegistrySliceProxy --+
                                                 |
                                                TaskRegistrySliceProxy

This object is an access list of tasks.

The 'tasks' represents all existing tasks.

A subset of tasks may be created by slicing (e.g. tasks[-10:] last ten tasks) or select (e.g. tasks.select(status='new') or tasks.select(10,20) tasks 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 run on all tasks in the current range. The keep_going=True (default) means that the operation will continue despite possible errors until all tasks 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
 
__str__(self, short=True)
Prints an overview over the currently running tasks
source code
 
_display(self, short=True)
Prints an overview over the currently running tasks
source code
 
copy(self, keep_going=True)
Copy all tasks.
source code
 
help(self, short=False)
Print a short introduction and 'cheat sheet' for the Ganga Tasks package
source code
 
pause(self, keep_going=True)
Pause all tasks.
source code
 
remove(self, keep_going=True)
Remove all tasks.
source code
 
run(self, keep_going=True)
Run all tasks.
source code
 
select(self, minid=None, maxid=None, **attrs)
Select a subset of tasks.
source code
 
table(self)
Prints a more detailed table of tasks and their transforms
source code

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

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: tasks(10) : get job with id 10 or raise exception if it does not exist. tasks((10,2)) : get transform number 2 of task 10 if exist or raise exception. tasks('10.2')) : same as above

__getitem__(self, x)
(Indexing operator)

source code 

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

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

source code 

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

__str__(self, short=True)
(Informal representation operator)

source code 

Prints an overview over the currently running tasks

Overrides: object.__str__

_display(self, short=True)

source code 

Prints an overview over the currently running tasks

Overrides: Registry.RegistrySliceProxy.RegistrySliceProxy._display

select(self, minid=None, maxid=None, **attrs)

source code 

Select a subset of tasks. Examples: tasks.select(10): select tasks with ids higher or equal to 10; tasks.select(10,20) select tasks with ids in 10,20 range (inclusive); tasks.select(status='completed') select all tasks with status completed; tasks.select(name='some') select all tasks with some name;

Overrides: Registry.RegistrySliceProxy.RegistrySliceProxy.select