?so basically you suggest not using turbogears transaction manager and
DBSession but to create a standalone sql session,engine,etc
I read sqlalchemy transaction  docs but this is different from the
transaction manager used in tg - based on repoze.tm or tm2 (not sure
which)

actually my problem right now isn't the db lock which I solved
but the ability to catch dbsession.flush failures
because after such flush failure the session is in need of a rollback
but if I rollback it breaks the transaction manager..

hmm. if no other good ideas i'll go for the different session idea,
maybe using the subtransaction idea


On 10 דצמבר, 22:23, ozwyzard <[email protected]> wrote:
> I use DBSession.begin() with the subtransactions flag to catch a flush
> error for a particular operation when I have a sequence of operations.
>
> You might want to check the following URL for sections on
> "transactions", "savepoints", "managing transactions"
>
> http://www.sqlalchemy.org/docs/orm/session.html
>
> If you would like to debug this further, you might want to :
> (a) look at your $project/model/__init__.py  (to see what arguments
> are used to create the DBSession)
> (b) i doubt that the entire DB is locked for a transaction
> (c) you could trying creating your own separate Session object and use
> it in your cron job.
>
> I suspect (c) might work for you.
>
> On Dec 10, 6:02 am, alonn <[email protected]> wro

-- 
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