![]() Server : Apache/2.4.52 (Ubuntu) System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64 User : www-data ( 33) PHP Version : 8.1.2-1ubuntu2.21 Disable Function : NONE Directory : /lib/python3/dist-packages/twisted/enterprise/__pycache__/ |
o �bA � @ sf d Z ddlmZ ddlmZmZ G dd� de�ZG dd� d�ZG dd � d �Z G d d� d�Z d dgZdS ) zg An asynchronous mapping to U{DB-API 2.0<http://www.python.org/topics/database/DatabaseAPI-2.0.html>}. � )�threads)�log�reflectc @ s e Zd ZdZdS )�ConnectionLostzb This exception means that a db connection has been lost. Client code may try again. N)�__name__� __module__�__qualname__�__doc__� r r �;/usr/lib/python3/dist-packages/twisted/enterprise/adbapi.pyr s r c @ s8 e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� ZdS ) � Connectiona A wrapper for a DB-API connection instance. The wrapper passes almost everything to the wrapped connection and so has the same API. However, the L{Connection} knows about its pool and also handle reconnecting should when the real connection dies. c C s || _ d | _| �� d S �N)�_pool�_connection� reconnect)�self�poolr r r �__init__ � zConnection.__init__c C s d S r r �r r r r �close$ s zConnection.closec C s� | j js| j�� d S z| j�� | j�� }|�| j j� |�� | j�� W d S t y7 t �d d� Y nw | j �| j� | j j rHt �d� t� �)N�Rollback failedzConnection lost.)r r r �rollback�cursor�execute�good_sqlr �commit� BaseExceptionr �err� disconnect�noisy�msgr )r �cursr r r r . s"