Package park :: Package fitting :: Module fitservice :: Class Client

Class Client

source code


Client-side view of the fitting service.
Instance Methods
 
__init__(self, url=None, user=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
notify(self, email=None, rate=None)
Set the email address and update frequency for user notification
source code
 
find_by_name(self, name) source code
 
find_jobs(self, status='active')
List active and recently completed jobs
source code
 
stop(self, jobid)
Delete job
source code
 
start(self, job) source code
 
fetch_job(self, jobid)
Retrieve job
source code
 
status(self, jobid)
Return the current job status
source code
 
listen(self, callback=on_message)
Listen to the message queue for information about running jobs.
source code

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

Properties

Inherited from object: __class__

Method Details

__init__(self, url=None, user=None)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

listen(self, callback=on_message)

source code 

Listen to the message queue for information about running jobs.

The listener runs in a separate thread, allowing the listen call to return immediately. The callback is called each time there is a new message on the queue. If no callback is supplied, then a simple print is used.