관리-도구
편집 파일: processor.cpython-311.pyc
� 9�1g � � � d Z ddlZddlZddlZddlZddlmZmZmZ ddlm Z m Z mZ ddlm Z mZ ddlmZ ddlmZ dd lmZ dd lmZ ddlmZmZmZmZmZmZ dd lmZ ddl m!Z!m"Z"m#Z# e! G d� de� � � � Z$dS )z- This module contains RequestProcessor class � N)�datetime� timedelta�timezone)�Thread�RLock�current_thread)�Callable�Any� )� AutoTracer)�Common)� DecisionMaker)�StatisticsSender� )� session_scope�setup_database� RequestResult�cleanup_old_data�restore_database�is_malformed_database)�SSAError)� singleton� url_split�switch_schedstatsc �� � � e Zd ZdZdZd� fd� Zed� � � Zdefd�Z dd �Z dd �Zdede fd�Zddefd�Zd� Zd� Zededefd�� � Zd� Zdd�Zdeddfd�Z� xZS )�RequestProcessorz^ SSA Request processor implementation. Only one instance is allowed to be created �d Nc �� �� t � � � � � t j d� � | _ | j � dt � � t d�� � |r|n t � � | _ t � � | _ t |�� � | _ t � � | _ t! |�� � | _ | � � � g | _ d S )N� req_processorzProcessor enabled: %sT��enabled)�engine)�super�__init__�logging� getLogger�logger�info�__package__r r r"