Server IP : 192.158.238.246 / Your IP : 18.117.156.19 Web Server : LiteSpeed System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64 User : jenniferflocom ( 1321) PHP Version : 8.1.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/python37/lib/python3.7/site-packages/beaker/ext/__pycache__/ |
Upload File : |
B ��[� � @ s� d dl mZ d dlZd dlZd dlmZ d dlmZmZ d dlmZm Z d dl mZmZ d dl mZmZ e�e�ZdadadaG dd � d e�ZG d d� de�ZdS )� )�pickleN)�datetime)�OpenResourceNamespaceManager� Container)�InvalidCacheBackendError�MissingCacheParameter)�file_synchronizer�null_synchronizer)�verify_directory�SyncDictc @ s~ e Zd Ze� Ze� Zedd� �Zddd�Zdd � Z d d� Z dd � Zdd� Zdd� Z dd� Zdd� Zdd� Zdd� Zdd� ZdS )�DatabaseNamespaceManagerc C sR t d k rd S y$dd la dd lma ddlma W n tk rL td��Y nX d S )Nr )�typesz8Database cache backend requires the 'sqlalchemy' library)�sa� sqlalchemyZsqlalchemy.pool�poolr �ImportErrorr )�cls� r �D/opt/alt/python37/lib/python3.7/site-packages/beaker/ext/database.py�_init_dependencies s z+DatabaseNamespaceManager._init_dependenciesNF�beaker_cachec s� t �| |� � dkri � d| _|r*|| _n|r8|d | _| jrHt| j� �pR� d ��� } � ���fdd�}i | _d| _d| _tj� | |�| _ dS )aT Creates a database namespace manager ``url`` SQLAlchemy compliant db url ``sa_opts`` A dictionary of SQLAlchemy keyword options to initialize the engine with. ``optimistic`` Use optimistic session locking, note that this will result in an additional select when updating a cache value to compare version numbers. ``table_name`` The table name to use in the database for the cache. ``schema_name`` The schema name to use in the database for the cache. Nz/container_db_lockzsa.urlc s� �� } � �fdd�}t j�| |�}tj�|tjdtjdd�tjdt�d�dd �tjd tj dd �tjdtj dd �tjdtj dd �t�d��r��n|jd � }|j dd� |S )Nc s&