Package pilot :: Package impl :: Module pilotcompute_manager :: Class ComputeUnit

Class ComputeUnit

source code


ComputeUnit (CU).

This is the object that is returned by the ComputeDataService when a new ComputeUnit is submitted 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
 
__init__(self, compute_unit_description=None, compute_data_service=None, cu_url=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
get_id(self)
Returns unique identifier of Compute Unit.
source code
 
get_url(self)
Returns URL of Compute Unit.
source code
 
get_details(self)
Returns dict with Compute Unit Details (e.g.
source code
 
get_state(self)
Returns current state of Compute Unit
source code
 
wait(self)
Wait until in Done state (or Failed state)
source code
 
cancel(self)
Terminates Compute Unit
source code
 
__repr__(self)
repr(x)
source code
 
set_callback(self, member, cb)
Set a callback function for a member. (Inherited from pilot.api.compute.api.ComputeUnit)
source code
 
unset_callback(self, member)
Unset a callback function from a member (Inherited from pilot.api.compute.api.ComputeUnit)
source code

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

Class Variables
  CU_ID_PREFIX = 'cu-'
Properties
  callback (Inherited from pilot.api.compute.api.ComputeUnit)
  description (Inherited from pilot.api.compute.api.ComputeUnit)
  id (Inherited from pilot.api.compute.api.ComputeUnit)
  state_detail (Inherited from pilot.api.compute.api.ComputeUnit)

Inherited from object: __class__

Method Details

__init__(self, compute_unit_description=None, compute_data_service=None, cu_url=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

get_id(self)

source code 

Returns unique identifier of Compute Unit. Deprecated: Please use get_url() instead.

get_url(self)

source code 

Returns URL of Compute Unit. This URL can be used to reconnect to this Compute Unit later on.

get_details(self)

source code 

Returns dict with Compute Unit Details (e.g. job description, timings)

get_state(self)

source code 

Returns current state of Compute Unit

Overrides: api.compute.api.ComputeUnit.get_state

wait(self)

source code 

Wait until in Done state (or Failed state)

Overrides: api.compute.api.ComputeUnit.wait

cancel(self)

source code 

Terminates Compute Unit

Overrides: api.compute.api.ComputeUnit.cancel

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)