title: Tasks queue process in python
body: <p>Task is:
  I have task queue stored in db. It grows. I need to solve tasks by python script when I have resources for it. I see two ways:</p>
  
  <ol>
  <li><p>python script working all the time. But i don't like it (reason posible memory leak).</p></li>
  <li><p>python script called by cron and do a little part of task. But i need to solve the problem of one working active script in memory (To prevent active scripts count grow). What is the best solution to implement it in python?</p></li>
  </ol>
  
  <p>Any ideas to solve this problem at all?</p>