> 2) Where is the "correct" place to define my sqlalchemy session
> factory (session = scoped_session(..))?

Turbogears2 paster template already does this for you, in the
models/__init__.py it creates a scoped session called DBSession, you
can import it directly and should be ok as scoped sessions are thread
local, there should not be a session shared between 2 threads or
processes.

As for your problem we could use more details (or even code examples)
of your application, for example, what DB are you using? if you are
using sqlite then it could be and access/locking problem (as sqlite
was not really meant for multiple processes opening the DB file),
MySQL or PostgreSQL should not have that problem and could be another
thing.

Regards,
Carlos Ruvalcaba

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to