Your IP : 18.118.198.191
�
tf� � � � d dl Z d dlZd dlZd dlmZmZ d dlmZmZmZm Z m
Z
mZmZ d dl
mZ d dlmZ d dlmZ d dlmZmZ e� � Z G d� d e� � Z G d
� de� � Zd� Zd
� Zd� Zd� Zdd�Zej defd�� � ZdS )� N)�datetime� timedelta)�Column�Boolean�DateTime�Integer�String�
create_engine�event)�declarative_base)� Inspector)�Session)�WMT_DB�RETENTION_TIME_DAYSc � � e Zd ZdZdZ eed�� � Z ee� � Z ee
d� d�� � Z ee� � Z
eed�� � Z eed�� � ZdS ) �ScrapeResultz2
created_date is saved in local TZ format
�
scrape_resultT��primary_keyc �( � t j � � S �N�r �now� � ��/builddir/build/BUILDROOT/cl-web-monitoring-tool-3.1.3-1.el8.cloudlinux.x86_64/opt/cloudlinux/venv/lib/python3.11/site-packages/wmt/db.py�<lambda>zScrapeResult.<lambda>) s � �8�<�>�>� r ��default�index)�nullableN)�__name__�
__module__�__qualname__�__doc__�
__tablename__r r �idr �websiter �create_dater �is_finished�
response_code�response_time_msr r r r r ! s� � � � � � �� � $�M� ���T� *� *� *�B��f�V�n�n�G��&��+A�+A��N�N�N�K��&��/�/�K��F�7�T�2�2�2�M��v�g��5�5�5���r r c � � e Zd ZdZdZ eed�� � Z eed�� � Z ee
d� d�� � Z eed� � � Z
d
S )�DomainAlertsz0
alert_time is saved in local TZ format
�
domain_alertsTr )r c �( � t j � � S r r r r r r zDomainAlerts.<lambda>9 s � �(�,�.�.� r r F)r N)r"