Re: Querysets returns wrong result when using threading.

2010-01-17 Thread Kieran Brownlees
Fantastic, thank you :) On Jan 16, 9:02 pm, Tomasz Zieliński wrote: > On 16 Sty, 06:15, Kieran Brownlees wrote: > > > Firstly thank you, secondly, how to get around it? I assume I need to > > force a commit for the transaction my thread is

Re: Querysets returns wrong result when using threading.

2010-01-15 Thread Kieran Brownlees
Firstly thank you, secondly, how to get around it? I assume I need to force a commit for the transaction my thread is using, but querysets don't appear to have a documented method to do that. Thank you On Jan 16, 1:52 am, Tomasz Zieliński wrote: > On 15 Sty,

Re: Querysets returns wrong result when using threading.

2010-01-15 Thread Tomasz Zieliński
On 15 Sty, 05:33, James Bennett wrote: > On Thu, Jan 14, 2010 at 10:26 PM, Kieran Brownlees > wrote: > > Basic example of format: > > Main Thread: print objects.all() > > Spawned Thread: print objects.all() -- same as main thread > > Main Thread:

Re: Querysets returns wrong result when using threading.

2010-01-14 Thread James Bennett
On Thu, Jan 14, 2010 at 10:26 PM, Kieran Brownlees wrote: > Basic example of format: > Main Thread: print objects.all() > Spawned Thread: print objects.all() -- same as main thread > Main Thread: objects.create(newObj) > Main Thread: print.objects.all() -- correct queryset,

Querysets returns wrong result when using threading.

2010-01-14 Thread Kieran Brownlees
Hello All, Using Django 1.1.1. Today I found some very strange behaviour when trying to use theading, from what I understand it is different from the notes on trac of querysets not being thread safe. Basic issue trying to execute queries while in a thread always returns an original query.