관리-도구
편집 파일: the_sink.cpython-311.opt-1.pyc
� IMgb, � �t � d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlmZ d dl m Z d dlmZm Z d dlmZ d dlmZmZmZ d dlmZ ej e� � Z ej dd d g� � Z G d� de� � Z G d � de� � Zd� Z G d� de� � Z G d� de� � Z G d� de j! � � Z"dS )� N)�suppress)� attrgetter)�Message�Reject)�BaseMessageProcessor)�DAY�ServiceBase� rate_limit)�g�ProcessingMessage�message� start_timec �2 � e Zd Zd� Zd� Zd� Zd� Zd� Zd� ZdS )�TheSinkc � � t |t d� � �� � | _ || _ t |t | j � � � � | _ | t _ d S )N�PROCESSING_ORDER)�key) �sortedr �_sinks_ordered�_loop�TaskManager�MessageProcessor� _task_managerr �sink)�self� sink_list�loops �W/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/internals/the_sink.py�__init__zTheSink.__init__ s` � �$��:�&8�9�9� � � ��� �� �(��"�4�#6�7�7� � ��� ����� c �8 � | j j �d| j j ��S )N�.)� __class__� __module__�__name__�r s r �__repr__zTheSink.__repr__# s � ��.�3�3�3�T�^�5L�5L�M�Mr c � �� �fd�| j D � � }t |� � dk s J d� � �t t |� � d� � S )ze introspection: decompose a specific role :return classobj: instance or None c �4 �� g | ]}t |�� � �|��S � )� isinstance)�.0r �classobjs �r � <listcomp>z%TheSink.decompose.<locals>.<listcomp>+ s8 �� � � � ��J�t�X�4N�4N� �� � � r � zAmbiguous requestN)r �len�next�iter)r r- �optionss ` r � decomposezTheSink.decompose&