I have a python file that works as well, it connects in another
website, doing something like that:
'response, content = self.http.request('http://www.spoj.pl/', 'POST',
headers=self.headers, body=urlencode(self.bodyLogin))'
It goes inside a class, when I run it in a thread it does not works.
If I try with runserver it works as well! But with Apache2 and
MOD_WSGI doesnt work!
I debugged somethings, I've tried to connect without using the
thread(calling the method in some view) and it worked.
But when I use my SingleTon class that has a bounded semaphores that
creates a thread and in that thread class this method that was talking
before, it stops in the response, content part.
So I did a little more tests, I've created a thread in my views and in
that thread called this method exactly the same way that I called
without threads and that worked, but it has not worked ;/
I've putted some prints in my code that is how I discovered the line
that has the bug, I've putted a print before call 'response, content'
and a print after, the before print appears but not the last, the
strange thing its that does not raise any kind of exception, cause I
have a try:, except Exception in a while True and it does not executes
the before print again...
some thing like
while True:
....try:
........print
........response....
....except Exception as detail:
.......pass
So I'm pretty sure that my bug is something related to Threads +
httplib2, if I use only httplib2 works as well!
If I use only django server works as well if threads and httplib2.
But when I try to deploy in my university server with apache2 and
mod_wsgi it bugs ;/
At my house with apache2 and mod_wsgi works as well
I have already installed apache2-threaded-dev...

-- 
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