On Mon, Sep 28, 2009 at 2:38 AM, Waqas <badar.wa...@gmail.com> wrote:

>
> I have written an offline application. In this application, i have
> written following code:
>
> rs = InqueuePing.objects.filter(processed = 0).order_by('-timestamp')
>
> if rs:
>    #bla bla bla here
>
>
> The process is hanging on evaluating the if condition. I digg the code
> of django and i found that django framework is getting hang in django/
> db/models/query.py in method _fill_cache(self, num=None). I found that
> nothing is happening  after the following line in _fill_cache(self,
> num=None) method:
>
> self._result_cache.append(self._iter.next())
>
> I found self._iter.next() is causing the issue. Any body else has face
> this problem or not. Can any body please tell me which function
> self._iter is pointing?
>

This is interesting and I have never seen this kind of issue. I am curious
to see if it only does it for this query or if it would for:
rs = InqueuePing.objects.filter(processed=0)

or

rs = InqueuePing.objects.order_by('-timestamp')

In my years of python programming, I have never seen python 'hang'. it
always is working on something. I would like to figure out what that
something is.

Before digging into Django's source code, can we get this down to a simplest
case. Can you create a fixture of the database? Can you create the lines
that hang? I would like to see if it might be a db configuration issue, your
code issue or a Django issue.

Thanks,

Michael

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to