On Thursday, June 2, 2016 at 1:39:51 PM UTC+2, Cristiano Coelho wrote:
>
> So what was stated on the stack overflow post that connections are somehow 
> closed only at the end of a request through the request end signal is still 
> the actual behavior?
>

Dunno, I do not read SO. Connections are closed at the start and end of 
request depending on the configuration.
 

> Any best / suggested practices on how to handle connections on threads 
> that are not part of the request cycle? 
>

Same as in any other (non-Django) program: Manually call 
connection.connect/close() at the relevant points.
 

> Considering the connections are automatically opened for you, it would be 
> great for them to be automatically closed/disposed for you on thread's death
>

No it would not be great at all, connections could theoretically shared 
between threads etc… In general Django has no way of knowing when you want 
to close it. In the end a "dying" thread which is not properly closed is a 
bug in your code anyways.

Cheers,
Florian
 

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/d88b9c64-e51e-4714-8f36-d6091ee06765%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to