Re: django database access with threadpool

2007-09-11 Thread johnny
I can someone tell me how the database connection is handled for threads. Do I have to pass conneciton object to each threads? All I am doing is this: @threadpool(pool) def process(i): print 'threadpool %i enter' % i p = Profile.objects.get(id=i) p.status ="sent" p.save()

django database access with threadpool

2007-09-11 Thread johnny
I am implementing a backend python script that updates the database. It uses threadpool(http://snippets.dzone.com/posts/show/4425#related). Threadpool size is 3. When records are returned, eg. 10 records, 3 threads are created, then the threads update the database, but doesn't seem to do