Package park :: Package core :: Module serviceproxy :: Class Job

Class Job

source code


Client side view of a job.

Inherit from here when creating new service interfaces.

Instance Methods
 
submit(self, server=None, request=None, tags=TAGS, when=None)
server - handle for the server request - content of the service request tags - strings to identify the job; default is your user name when - preconditions for starting the job
source code
 
abort(self)
Tell the job to stop running.
source code
 
cleanup(self)
Remove intermediate state about the job, such as the logging information and temporary files from the computation.
source code
 
delete(self)
Remove the job from the server and all associated data.
source code
 
status(self)
Ask for the current job status.
source code
 
isimproved(self, expression)
Condition for queuing job dependencies.
source code
 
wait(self, interval=0.1, timeout=0)
Wait for the job to complete.
source code
 
listen(self, monitor)
Attach an additional monitor to the job.
source code
 
set(self, **kw)
Set attributes on the running service.
source code
 
loglevel(self, level)
NOTSET, DEBUG, INFO, WARN, ERROR, CRITICAL
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables
  result = None
The output from the job.
  server = None
The job queue which is managing the service
  service = None
The service proxy.
  request = None
Request associated with this job
  name = None
Name of the job
Instance Variables
  iscompleted
Condition which is true when the job is completed
Properties

Inherited from object: __class__

Method Details

abort(self)

source code 
Tell the job to stop running. Any output from the job will still be on the server for later pickup.

cleanup(self)

source code 

Remove intermediate state about the job, such as the logging information and temporary files from the computation.

The job is moved from the active list to the archived list.

status(self)

source code 
Ask for the current job status. Because the job is running asynchronously, the results may be out of date by the time they are received.

isimproved(self, expression)

source code 

Condition for queuing job dependencies.

When expression evaluates to True the condition is satisfied.

The expression can contain the usual math and linear algebra functions from numpy operating on the attributes of the IsImproved message for the service.

wait(self, interval=0.1, timeout=0)

source code 

Wait for the job to complete.

interval is time interval between checks for completion.

This is used in scripts to impose a synchronous interface to the fitting service.

loglevel(self, level)

source code 
Specify the logging level for the job. The levels are::
NOTSET, DEBUG, INFO, WARN, ERROR, CRITICAL

These constants are defined in the logging package. The default is ERROR.


Class Variable Details

result

The output from the job. This field is job specific.
Value:
None

service

The service proxy. Use job.service.m1(p1,p2,...) to invoke method m1 with parameters p1, p2, etc.
Value:
None