Package gavo :: Package protocols :: Module uws :: Class UWSWithQueueing
[frames] | no frames]

Class UWSWithQueueing

source code

object --+    
         |    
       UWS --+
             |
            UWSWithQueueing
Known Subclasses:

A UWS with support for queuing.

Queuing is done on UWS level rather than at transitions. With a plain UWS, if something is put on the queue, it must be started by the Transition's queueJob method.

With UWSWithQueuing, you just mark the job queued and the rest is taken care of by the UWS itself.

Instance Methods
 
__init__(self, jobClass, actions)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
scheduleProcessQueueCheck(self)
tells TAP UWS to try and dequeue jobs next time checkProcessQueue is called.
source code
 
checkProcessQueue(self)
sees if any QUEUED process can be made EXECUTING.
source code
 
changeToPhase(self, jobId, newPhase, input=None, timeout=10)
overridden here to hook in queue management.
source code

Inherited from UWS: changeableJob, cleanupJobsTable, countQueuedJobs, countRunningJobs, destroy, getIdsAndPhases, getJob, getJobIds, getNewIdFromRequest, getNewJob, getNewJobId, getURLForId, runCanned

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

Class Variables
  runcountGoal = 1
hash(x)

Inherited from UWS: cleanupInterval, jobdocPreamble, joblistPreamble

Properties

Inherited from object: __class__

Method Details

__init__(self, jobClass, actions)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

scheduleProcessQueueCheck(self)

source code 

tells TAP UWS to try and dequeue jobs next time checkProcessQueue is called.

This function exists since during the TAPTransistions there's a writable job and processing the queue might deadlock. So, rather than processing right away, we just note something may need to be done.

checkProcessQueue(self)

source code 

sees if any QUEUED process can be made EXECUTING.

This must be called while you're not holding any changeableJob.

changeToPhase(self, jobId, newPhase, input=None, timeout=10)

source code 
overridden here to hook in queue management.
Overrides: UWS.changeToPhase