File: //opt/cloudlinux/venv/lib64/python3.11/site-packages/ssa/modules/__pycache__/common.cpython-311.pyc
�
    Heh�  �                   �P   � d Z ddlZddlmZ ddlmZ ddlmZ  G d� d�  �        ZdS )	zn
This module contains a base class including methods, common for
SSA Request Processor and SSA Decision Maker
�    N)�Tuple)�date�   ��load_configurationc                   �   � e Zd ZdZd� Zd� Zedefd��   �         Zede	fd��   �         Z
dedefd�Z
edefd	��   �         Zd
S )�Commonz
    Base SSA module class
    c                 �8   � | �                     �   �         | _        d S )N)�	load_conf�config��selfs    �I/opt/cloudlinux/venv/lib64/python3.11/site-packages/ssa/modules/common.py�__init__zCommon.__init__   s   � ��n�n�&�&�����    c                 �N   � t          | d�  �        }|�                    |d�  �        S )a  
        All undefined attributes, e.g.
            - domains_number
            - urls_number
            - correlation_coefficient
            - correlation
            - request_number
            - time
        are queried in config.
        Others would be empty
        r   � )�getattr�get)r   �item�confs      r   �__getattr__zCommon.__getattr__   s'