|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /opt/alt/python37/lib/python3.7/site-packages/beaker/ext/__pycache__/ |
Upload File : |
B
��[y � @ sz d dl mZ d dlZd dlmZ d dlmZmZ d dlmZ d dl m
Z
e�e�Z
daG dd� de�ZG d d
� d
e�ZdS )� )�pickleN)�datetime)�OpenResourceNamespaceManager� Container)�InvalidCacheBackendError)�null_synchronizerc @ sv e Zd Zi Zedd� �Zddd�Zdd� Zdd � Zd
d� Z dd
� Z
dd� Zdd� Zdd� Z
dd� Zdd� Zdd� ZdS )�GoogleNamespaceManagerc C s@ t d k rd S ytd�jjj a W n tk
r: td��Y nX d S )Nzgoogle.appengine.ext.dbzCDatastore cache backend requires the 'google.appengine.ext' library)�db�
__import__Z appengine�ext�ImportErrorr )�cls� r �B/opt/alt/python37/lib/python3.7/site-packages/beaker/ext/google.py�_init_dependencies s z)GoogleNamespaceManager._init_dependencies�beaker_cachec sb t �| |� � fdd�}� | _tj�� |� �| _i | _d| _d| _ t
jt�
� k| _d| j | _dS )z%Creates a datastore namespace managerc s. t t�� t�� t�� d�} t� tjf| �}|S )N)�created�accessed�data)�dictr ZDateTimePropertyZBlobProperty�typeZModel)Z
table_dict�table)�
table_namer r �
make_cache! s
z3GoogleNamespaceManager.__init__.<locals>.make_cacheFzp%sN)r �__init__r r �tables�
setdefault�cache�hash�_is_new�loaded�logging�DEBUG�logZgetEffectiveLevel� log_debug� namespace)�selfr% r �paramsr r )r r r s zGoogleNamespaceManager.__init__c C s t � S )N)r )r&