Changeset 1393


Ignore:
Timestamp:
02/22/07 17:00:18 (6 years ago)
Author:
mglb1
Message:

Improve database reconnection robustness

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ccsd/trunk/crcnetd/_utils/ccsd_session.py

    r1392 r1393  
    378378            if icursor is None: 
    379379                cursor.close() 
     380            # If the error seems to be connection related, reconnect 
     381            if value.startswith("no connection"): 
     382                self._connect() 
    380383            self.lock.release() 
    381384            raise ccsd_session_error(errStr) 
     
    486489            errStr = "%s - Failed Execute: %s (%s)" %  (value, sql, params) 
    487490            log_error(errStr, (et, value, bt)) 
     491            # If the error seems to be connection related, reconnect 
     492            if value.startswith("no connection"): 
     493                self._connect() 
    488494            self.lock.release() 
    489495            raise ccsd_session_error(errStr) 
Note: See TracChangeset for help on using the changeset viewer.