On Fri, Mar 16, 2007 at 01:56:49PM +0100, sophana wrote:
> Why does it have to get a new connection? Why not using the current
> thread connection, as there can't be any other request made?
hub.getConnection() should do this. Don't know why it leaks connections.
> Ok, but you use the doInTrans
Oleg Broytmann a écrit :
> conn = conn.transaction()
>
>creates a new transaction object; the object acquires a new low-level
> connection from the pool and stores it; the low-level connection is removed
> from the pool; "releasing" means "return it to the pool". For
> single-threaded programs
Hello!
On Fri, Mar 16, 2007 at 12:33:49AM +0100, sophana wrote:
> Yes it seems to work much better with commit(True).
Good. I will fix that. Thank you for testing!
> Could you tell me a little more about how this works? what mean released
> here?
conn = conn.transaction()
creates a new t
Oleg Broytmann a écrit :
> On Thu, Mar 15, 2007 at 11:29:31AM -0500, Rick Flosi wrote:
>
>> def doInTransaction(func, *args, **kw):
>>
>
>This code has been added to the SQLObject and is now in SQLObject 0.8.
>
>
>> else:
>> conn.commit()
>> return
On Thu, Mar 15, 2007 at 11:29:31AM -0500, Rick Flosi wrote:
> def doInTransaction(func, *args, **kw):
This code has been added to the SQLObject and is now in SQLObject 0.8.
> else:
> conn.commit()
> return value
I think here is a problem. conn.commit(True
I had problems with sqlobject's doInTransaction() in the past. Ian wrote
the following for me which I have been using successfully.
def doInTransaction(func, *args, **kw):
"""
This routine can be used to run a function in a transaction,
rolling the transaction back if any exception
On Thu, Mar 15, 2007 at 05:13:30PM +0100, sophana wrote:
> At the end, I have an sql error saying that there is no more connection
> possible. There are indeed 100 processes sleeping.
> What is creating all these connections?
Seems .doInTransaction() must call conn.commit(True). Can you test if
Hi
I'm testing transactions with sqlobject.
I found the doInTransaction method
so I made a test:
(python2.4 sqlobject 0.8.0 mysql innodb table)
class TestSql(SQLObject):
k= IntCol(default=None)
v= IntCol(default=None)
def init():
TestSql.dropTable()
TestSql.createTable(