Re: [SQLObject] Hung transactions on object creation
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Sidnei da S. <si...@aw...> - 2003-10-27 20:58:07
|
| Rolling back in that circumstance is way too aggressive. It should be | possible to catch the exception and handle it within the transaction. That's what I thought, but it doesn't seem to be getting far enough to call rollback() from what I can see, which is really strange. The current situation is that I have the SQLObject registered with Zope's TransactionManager and when there's an exception, Zope aborts the transaction, calling SQLObject's rollback() method. This works fine in all cases, *except* when the exception happens in SQLObject.new (or so it seems). | Do you have an idea what "idle in transaction" means, and what's | causing it? Are we talking about database-generated exceptions (like | IntegrityError), or Python-generated (ValueError or something)? Or | either? It is waiting either for a rollback or a commit (eg: its a transaction in progress). The exception is TypeError, generated inside SQLObject.new(). When I call the rollback() there before raising the exception, it works just fine. []'s -- Sidnei da Silva <si...@aw...> dreamcatching :: making your dreams come true http://awkly.org System going down in 5 minutes. |