I am looking for a reliable implementation to allow me to gradually work through a list of elements using Queue .
The idea is that I want to use a certain number of workers who will go through a list of 20+ tasks with an intensive database and return a result. I want Python to start with the first five elements, and as soon as this is done with one task, the next task in the queue begins.
This is how I do it now without Threading .
for key, v in self.sources.iteritems(): # Do Stuff
I would like to have a similar approach, but perhaps without having to split the list into subgroups of five. So he will automatically pick up the next item in the list. The goal is to make sure that if one database slows down the process, it will not adversely affect the entire application.
eandersson
source share