Package intermine :: Module idresolution :: Class Job
[hide private]
[frames] | no frames]

Class Job

source code

object --+
         |
        Job

A Representation of an Identifier Resolution Job

Users can submit requests to resolve sets of IDs to objects in the data-store. These jobs begin in a PENDING state, and transition through RUNNING to either SUCCESS or ERROR.

Upon completion, the results of the job may be fetched, and the job may be deleted on the server.

Instance Methods [hide private]
 
__init__(self, service, uid)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
poll(self)
Check to see if the job has been completed, updating the status of the job in the process.
source code
dict
fetch_status(self)
Retrieve the results of this completed job from the server.
source code
 
delete(self)
Delete the job from the server.
source code
 
fetch_results(self)
Retrieve the current status of this job from the server.
source code

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

Class Variables [hide private]
  INITIAL_DECAY = 1.25
  INITIAL_BACKOFF = 0.05
  MAX_BACKOFF = 60
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, service, uid)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

poll(self)

source code 

Check to see if the job has been completed, updating the status of the job in the process.

Returns:
Boolean Whether or not the job is complete.

delete(self)

source code 

Delete the job from the server.

The job should not be used again once this method has been invoked.

fetch_results(self)

source code 

Retrieve the current status of this job from the server.

@rtype String