I'm not sure what `request.peewee_dbs()[db].connect()` does, but I would probably recommend against this db setup pattern that you're using. By doing this in a tween, every request that pyramid handles will do a connect/disconnect to all the databases you defined.
One of the more popular patterns to implement db connections is something like this: - `add_request_method` provides an object that either returns an database connection, or creates a new one. - if you create a new connection, it registers a 'db.close()' via `add_finished_callback` this way you only connect as needed, and disconnect to actually connected databases. -- You received this message because you are subscribed to the Google Groups "pylons-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-devel+unsubscr...@googlegroups.com. To post to this group, send email to firstname.lastname@example.org. Visit this group at http://groups.google.com/group/pylons-devel. For more options, visit https://groups.google.com/d/optout.