The spyne.auxproc package contains backends to process auxiliary method contexts.
“Auxiliary Methods” are methods that run asyncronously once the primary method returns (either successfully or not). There can be only one primary method for a given method identifier but zero or more auxiliary methods.
To define multiple auxiliary methods for a given main method, you must use separate ServiceBase subclasses that you pass to the spyne.application.Application constructor.
Auxiliary methods are a useful abstraction for a variety of asyncronous execution methods like persistent or non-persistent queueing, async execution in another thread, process or node.
Classes from this package will have the AuxProc suffix, short for “Auxiliary Processor”.
This package is EXPERIMENTAL.
Override this method to make arbitrary initialization of your AuxProc. It’s called once, ‘as late as possible’ into the Application initialization.
Override this method to alter thow the auxiliary method context is initialized. It’s called every time the method is executed.
Bases: spyne.auxproc._base.AuxProcBase
SyncAuxProc processes auxiliary methods synchronously. It’s useful for testing purposes.
Bases: spyne.auxproc._base.AuxProcBase
ThreadAuxProc processes auxiliary methods asynchronously in another thread using the undocumented multiprocessing.pool.ThreadPool class. This is available in Python 2.7. It’s possibly there since 2.6 as well but it’s hard to tell since it’s not documented.
Parameters: | pool_size – Max. number of threads that can be used to process methods in auxiliary queue in parallel. |
---|