I have also recently used Beanstalkd to queue up tasks that will run in a separate thread. Your web.py handler just drops a job into a pipe and a completely separate script executes it. You could have any number of these, and you get the benefits of advanced queue control, etc..