Trees | Indices | Help |
|
---|
|
object --+ | NPSGDWorker
Worker class for executing models and sending out result emails.
This enters a polling loop where the worker will poll the queue for tasks at a fixed interval. When it finds a task, it will decode it into a model, then process it using the model's "run" method.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
Inherited from |
|
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
Handle creation and running of a model and setup heartbeat thread. This is the heart of a worker. When we find a model on the queue, this method takes the request and decodes it into something that can be processed. It will then spawn a heartbeat thread that continues to check into the server while we actually enter the models "run" method. From there, it is all up to the model to handle. |
Method for ensuring that the queue still recognizes our task id. If the queue has expired the task for some reason (i.e. a timeout) this method will return false. Otherwise, it means we can proceed. |
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Jan 13 12:54:32 2011 | http://epydoc.sourceforge.net |