When failing to get it from the thread is that always because the
connection is closed or could it also be because some other thread had
locked the previously opened connection?



On Sun, Mar 13, 2011 at 9:54 PM, Fernando Correa Neto <fcd...@gmail.com> wrote:
> Hi
>
> On Sun, Mar 13, 2011 at 5:54 AM, Seth <seedifferen...@gmail.com> wrote:
> [snip]
>> How are other people connecting to a db with high-traffic sites using
>> Pyramid and avoiding the static_route re-connection nonsense? Perhaps we
>> could request to get a matched_route object on the NewRequest event object?
>
> I usually try to stick to a connection that is always on environ.
> You'd have a wsgi middleware that always try to get the connection
> from the threadinglocal and expose that under some environ key, say,
> 'conn.mongo'.
> If the middleware fails to get that from the thread, you'd create
> another connection and then re-expose it under the same key.
>
> Regards,
> Fernando
>
> --
> You received this message because you are subscribed to the Google Groups 
> "pylons-devel" group.
> To post to this group, send email to pylons-devel@googlegroups.com.
> To unsubscribe from this group, send email to 
> pylons-devel+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/pylons-devel?hl=en.
>
>



-- 
med venlig hilsen / with kind regards
Jørgen G. Jørgensen.
---

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

Reply via email to