pilot.api.compute.api.ComputeUnit

Package pilot :: Package api :: Package compute :: Module api :: Class ComputeUnit |

# Class ComputeUnit

source code

ComputeUnit (CU).

This is the object that is returned by the ComputeUnitService when a new ComputeUnit is created based on a ComputeUnitDescription.

The ComputeUnit object can be used by the application to keep track of ComputeUnits that are active.

A ComputeUnit has state, can be queried and can be cancelled.

Instance Methods
cancel(self) Cancel the CU. | source code
get_state(self) | source code
set_callback(self, member, cb) Set a callback function for a member. | source code
unset_callback(self, member) Unset a callback function from a member | source code
wait(self) Wait until in Done state (or Failed state) | source code
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__init__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties
| callback
| description
| id
| state_detail
Inherited from `object`: `__class__`

Method Details

### set_callback(self, member, cb) | source code
Set a callback function for a member. Keyword arguments: member -- The member to set the callback for (state / state_detail). cb -- The callback object to call.

### unset_callback(self, member) | source code
Unset a callback function from a member Keyword arguments: member -- The member to unset the callback from.