[Twisted-Python] newbie: scheduling/queuing tasks with xmlrpc

Andy Gayton andy at thecablelounge.com
Thu Mar 17 18:15:49 MST 2005


Jp Calderone wrote:

>     The called and paused Deferred attributes are not really public.  You should avoid using them if at all possible (and it almost always is).  Likewise, the pause() and unpause() methods are more for the convenience of Deferred's implementation and you should never need to call them.

Thinking over the recent deferred timeout thread:

http://marc.free.net.ph/message/20050225.195330.793c275f.en.html#twisted-python

it looks like methods like pause, unpause, cancel and timeout should all 
be handled by the source of the operation.  A common operation (job) api 
that exposed these methods would make building generic scheduling 
frameworks easier.

Dustin I don't know if you'd find this thread of interest:

http://twistedmatrix.com/pipermail/twisted-python/2004-March/007271.html

The problem with the DeferredPriorityQueue there for your case is if 
enough hour long jobs come to use up all available tokens, the server 
would be clogged up until they finish.  If the queue took jobs with an 
agreed on way of pausing them, long running jobs low priority jobs could 
be put on hold when higher priority jobs turn up ..

Andy.




More information about the Twisted-Python mailing list