Re: [Twisted-Python] A resizable cooperator class for queuing and dispatching jobs
"Dave" == Dave Peticolas <dave@krondo.com> writes:
Dave> Cool. What about being able to get the set of underway objects, in Dave> addition to the set of pending objects? Then you can get the whole Dave> state of the queue at that point. I added an underway() method that gets you a set of underway jobs, each with its job spec, deferred, and start time. I guess you could add callbacks or timeouts to the set of outstanding deferreds (e.g., for some reason you're about to pause and you know the currently outstanding jobs are going to fail or are somehow invalid and that you're going to have to redo them, so you could add a callback to each to put it back on the queue, and then call pause). Dave> I think: Dave> queue.resume(0) Dave> doesn't work the way you'd expect at the moment. OK, added an assert to make sure you can't do this. I'm not sure the details of all this are of interest to many people on the list. I'll find time to put the code up somewhere more useful. It would be nice to have a runnable demo/example too. Not sure I'll get there. Terry
On Dec 11, 2009, at 6:44 AM, Terry Jones wrote:
I'm not sure the details of all this are of interest to many people on the list. I'll find time to put the code up somewhere more useful. It would be nice to have a runnable demo/example too. Not sure I'll get there.
Cool, if you'll put up a link when it's up, that'd be great. While a demo would be great, it seems like something you'd be able to figure out how to use if you need it. S
participants (2)
-
ssteinerX@gmail.com
-
Terry Jones