I was advised a while back by someone to throw my MongoDB connection call into a pyramid.events.NewRequest subscriber. However, this has proven to be a bad idea because the NewRequest subscriber gets called even if the request is a static_route request, and since the event.request object in the NewRequest subscriber doesn't have a matched_route attribute, there's no bullet-proof way to filter those out.
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? Thanks, Seth -- 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.