[PEAK] peak.running.daemons and Twisted

John Landahl john at landahl.org
Fri Apr 23 14:44:59 EDT 2004


Will running.daemons.TaskQueue and AdaptiveTask work with Twisted?

Also, the processes that I'd like to base on AdaptiveTask will need to 
yield on deferreds (they'll be doing remote PB calls to see if they have 
work to do).  For this to work it looks like I'd need to subclass 
TaskQueue and AdaptiveTask and override _processNextTask() and 
__call__() respectively.  If I understand things correctly,  
_processNextTask() would need to "yield task(); didWork = 
events.resume()" instead of "didWork = task()", and __call__() would 
need to  "yield self.getWork; job = events.resume()" instead of "job = 
self.getWork()" (the call to doWork() would probably need to be modified 
similarly as well).  Does this seem like it could work?



More information about the PEAK mailing list