Package gavo :: Package protocols :: Module tap :: Class TAPTransitions
[frames] | no frames]

Class TAPTransitions

source code

            object --+            
                     |            
    uws.UWSTransitions --+        
                         |        
  uws.SimpleUWSTransitions --+    
                             |    
uws.ProcessBasedUWSTransitions --+
                                 |
                                TAPTransitions

The transition function for TAP jobs.

There's a hack here: After each transition, when you've released your lock on the job, call checkProcessQueue (in reality, only PhaseAction does this).

Instance Methods
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
getCommandLine(self, wjob) source code
 
queueJob(self, newState, wjob, ignored)
puts a job on the queue.
source code
 
errorOutJob(self, newPhase, wjob, ignored)
pushes a job to an error state.
source code
 
completeJob(self, newPhase, wjob, ignored)
pushes a job into the completed state.
source code
 
killJob(self, newPhase, wjob, ignored)
tries to kill/abort job.
source code

Inherited from uws.ProcessBasedUWSTransitions: startJob

Inherited from uws.SimpleUWSTransitions: ignoreAndLog, markAborted

Inherited from uws.UWSTransitions: flagError, getTransition, noOp, noteEndTime

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

Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

getCommandLine(self, wjob)

source code 
Overrides: uws.ProcessBasedUWSTransitions.getCommandLine

queueJob(self, newState, wjob, ignored)

source code 

puts a job on the queue.

Overrides: uws.SimpleUWSTransitions.queueJob

errorOutJob(self, newPhase, wjob, ignored)

source code 

pushes a job to an error state.

This is called by a worker; leaving the error message itself is part of the worker's duty.

Overrides: uws.SimpleUWSTransitions.errorOutJob
(inherited documentation)

completeJob(self, newPhase, wjob, ignored)

source code 
pushes a job into the completed state.
Overrides: uws.SimpleUWSTransitions.completeJob
(inherited documentation)

killJob(self, newPhase, wjob, ignored)

source code 

tries to kill/abort job.

Actually, there are two different scenarios here: Either the job has a non-NULL startTime. In that case, the child job is in control and will manage the state itself. Then kill -INT will do the right thing.

However, if startTime is NULL, the child is still starting up. Sending a kill -INT may do many things, and most of them we don't want. So, in this case we kill -TERM the child, do state management ourselves and hope for the best.

Overrides: uws.SimpleUWSTransitions.killJob
(inherited documentation)