gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] new functions in gmPG


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] new functions in gmPG
Date: Tue, 23 Sep 2003 12:51:00 +0200
User-agent: Mutt/1.3.22.1i

> > Also, _get_medical_age() has *already* been converted. You
> > should have been getting merge conflicts during checkin.
> I did, I have preserved your changes, with the exception of
> the new function run_commit ()
I noticed. We've been working concurrently getting
serialization errors, apparently :-)

Anyways, how about the following for run_commit():

def run_commit():
    conn = rw_conn_pool.get_cached()
    if conn is None:
        if rw_conn_pool.curr_size_per_service() > 
rw_conn_hard_limit_per_service:
            _log('insufficient connections, getting temporary one')
            conn = rw_conn_pool.establish_new(keep=false)
        else:
            _log('insufficient connections, increasing pool')
            conn = rw_conn_pool.establish_new(keep=true)
    ... error checking ...
    do_stuff()
    conn.commit()

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

[Prev in Thread] Current Thread [Next in Thread]