Package park :: Package core :: Module jobqueue :: Class JobManager

Class JobManager

source code


Keep track of a set of jobs. The set of jobs known by the server. Server-side view of the fitting service.

Note that this needs to move into a transaction-based persistent store so that server reboot does not terminate long running jobs.

This will presumably map to a torque job queue

Instance Methods
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__getitem__(self, jobid)
Return the specified job.
source code
 
__delitem__(self, jobid)
Remove the specified job id.
source code
 
find_jobs(self, status)
Return a list of all job (id,name) matching the given status.
source code
 
stop(self, jobid)
Stop a job.
source code
 
start(self, job)
Add a job to the job queue.
source code

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

Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

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

__getitem__(self, jobid)
(Indexing operator)

source code 

Return the specified job.

Raises KeyError if the job cannot be found.

__delitem__(self, jobid)
(Index deletion operator)

source code 

Remove the specified job id.

Raises KeyError if the job cannot be found.

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.