File: //opt/cloudlinux/venv/lib64/python3.11/site-packages/ssa/__pycache__/db.cpython-311.pyc
�
�e�i� � �f � d dl Z d dlZd dlZd dlZd dlmZmZ d dlmZmZm Z m
Z
mZmZm
Z
mZmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d Zed
z ZdZ e� � Z ej d� � Z G d
� de� � Z dd�Z!d� Z"d� Z#d� Z$d� Z%d� Z&dd�Z'd� Z(d� Z)d� Z*ej+ defd�� � Z,dS )� N)�datetime� timedelta) �Column�Boolean�DateTime�Integer�String�
create_engine�event�func�text)�declarative_base)� Inspector)�Session)�close_all_sessions)�
DatabaseErrorz/var/lve/ssa.dbz.old� �cleanup_old_datac �� � e Zd ZdZdZ eed�� � Z eedd�� � Z eedd�� � Z
eed�� � Z eed�� � Z ee
d�� � Z ee
d�� � Z eed�� � Z eed�� � Z ee
d�� � Z e ed�� � ej � � d� � � Z e ed�� � ej � � ej � � �
� � ZdS )�
RequestResultay
Describes processed request stored in database file.
E.g.
{
"timestamp": "1650008727",
"url": "http://mydomain.com/index.php",
"duration": 162077,
"hitting_limits": false,
"throttled_time": 0,
"io_throttled_time": 0,
"wordpress": true
}
Note: created_at, updated_at is saved in local TZ format
�
scrape_resultT)�primary_keyF)�index�nullable)r )�timezone)�server_defaultr )�onupdater N)�__name__�
__module__�__qualname__�__doc__�
__tablename__r r �idr �domain�path� timestamp�durationr �is_slow_request�hitting_limits�throttled_time�io_throttled_time� wordpressr r �now�
created_at�
updated_at� � �=/opt/cloudlinux/venv/lib64/python3.11/site-packages/ssa/db.pyr r '