Package park :: Package core :: Module server :: Class Server

Class Server

source code


Define the backend interface to the job manager and user database.
Instance Methods
 
connect(self, user, token)
Connect to the service and establish user credentials.
source code
 
submit(self, request=request, when=when) source code
 
set_tags(self, tags)
Set the base tags associated with new jobs.
source code
 
set_email(self, email)
Set the user email.
source code
 
stop(self, jobid)
Stop a job.
source code
 
start(self, job, inputs=None)
Add a job to the job queue, returning jobid.
source code
 
jobs(self) source code
 
__enter__(self)
Set the default service for subsequent requests.
source code
 
__leave__(self) source code

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

Properties

Inherited from object: __class__

Method Details

set_tags(self, tags)

source code 

Set the base tags associated with new jobs.

Jobs are searchable by tags. Some tags come

stop(self, jobid)

source code 

Stop a job.

Raises KeyError if the job is not running.

This is likely triggered by the client as requested by the user, but may also be triggered by the job itself if it notices that it is failing.

start(self, job, inputs=None)

source code 
Add a job to the job queue, returning jobid. Inputs is the set of inputs to run through the job, or None if the job is to run once between prepare and cleanup.

__enter__(self)

source code 

Set the default service for subsequent requests.

Example:

with park.local_service:
    M1 = Assembly((model,data))
    fit = Fit(M1)
    err = Uncertainty(M1, fit.result, after=fit)
result = err.wait()