Home | Trees | Indices | Help |
|
---|
|
object --+ | BaseUWSJob
An abstract UWS job.
UWS jobs are always instanciated with a row from the associated jobs table (i.e. a dictionary giving all the uws properties). You can read the properties as attributes. UWSJobs also keep a (weak) reference to the UWS that made them.
To alter uws properties, use the change method. This will fail unless the job was created giving writable=True.
To make it concrete, you need to define:
You may want to override:
For every piece of the job parameters, define class attributes _parameters_<parname.lower()> with JobParameter values saying how they are serialized and deserialized. Only parameters defined in this way are accepted and integrated into the parameters dict.
If you need to clean up before the job is torn down, redefine the prepareForDestruction method.
Nested Classes | |
__metaclass__ The metaclass for UWS jobs. |
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
Class Methods | |||
|
|||
|
Properties | |
quote Always returns None. |
|
Inherited from |
Method Details |
x.__init__(...) initializes x; see help(type(x)) for signature
|
x.__setattr__('name', value) <==> x.name = value
|
enters parName:parValue into self.parameters after deserializing it. This is when input comes from text; use setPar for values already parsed. |
returns self.parameters[parName] in text form. This is for use from a text-based interface. Workers read from parameters directly. |
sets our parameter dict from a nevow request. This can be called on both writable and non-writable jobs. |
returns the action prescribed to push self to newPhase. A ValidationError is raised if no such transition is defined. |
changes the property values to what's given by the keyword arguments. It is an AttributeError to try and change a property that is not defined. |
returns the properties of the job as they are stored in the database. Use attribute access to read them and change to change them. Do not get values from the dictionary you get and do not change the dictionary. |
fetches a new copy of the job props from the DB. You should in general not need this, since UWSJob objects are intended to be short-lived ("for the duration of an async request"). Still, for testing and similar, it's convenient to be able to update a UWS job from the database. |
is called before the job's database row is torn down. Self is writable at this point. |
a context manager for a writeable version of the job. Changes will be written back at the end, and the job object itself will be updated from the database. If self already is writable, it is returned unchanged, and changes are only persisted when the enclosing controlling block finishes.
|
Property Details |
quoteAlways returns None. Override if you have a queue management.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu May 2 07:29:09 2019 | http://epydoc.sourceforge.net |