File: //opt/alt/python37/lib/python3.7/site-packages/ssa/__pycache__/db.cpython-37.pyc
B
V�dZ
� @ s� d dl Z d dlZd dlZd dlmZmZ d dlmZmZmZm Z m
Z
mZmZm
Z
d dlmZ d dlmZ d dlmZ dZdZe� ZG d d
� d
e�Zdd� Zd
d� Zdd� Zdd� Zdd� Zddd�Zejed�dd��ZdS )� N)�datetime� timedelta)�Column�Boolean�DateTime�Integer�String�
create_engine�event�func)�declarative_base)� Inspector)�Sessionz/var/lve/ssa.db� c @ s� e Zd ZdZdZeedd�Zeeddd�Z eeddd�Z
eedd�Zeedd�Zee
dd�Zee
dd�Zeedd�Zeedd�Zee
dd�Zeedd�e�� d �Zeedd�e�� e�� d
�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
Z
scrape_resultT)Zprimary_keyF)�index�nullable)r )�timezone)�server_default)Zonupdater N)�__name__�
__module__�__qualname__�__doc__Z
__tablename__r r �idr �domain�path� timestamp�durationr Zis_slow_requestZhitting_limitsZthrottled_timeZio_throttled_timeZ wordpressr r �now�
created_atZ
updated_at� r r �7/opt/alt/python37/lib/python3.7/site-packages/ssa/db.pyr "