Edit File: strategy_getter.cpython-311.opt-1.pyc
� P6h � � � d Z ddlZddlZddlZddlmZ ddlmZmZ ddl m Z ddlmZ ej e� � Z G d� dej � � ZdS ) zDPlugin that detects whether IDS has set on non-resident agent start.� N)�utils)�plugins�messages��strategy)�configc �l � � e Zd ZdZ� fd�Zd� Zd� Z ej e � � d� � � Z d� Zd� Z� xZ S )�StrategyGetterz8Send StrategyChange message on non-resident agent start.c �H �� t � � j di |�� d | _ d S )N� )�super�__init__�_StrategyGetter__task)�self�kwargs� __class__s ��R/opt/imunify360/venv/lib/python3.11/site-packages/im360/plugins/strategy_getter.pyr zStrategyGetter.__init__ s+ �� ������"�"�6�"�"�"������ c � �~ K � || _ || _ |� | � � � � � | _ d S �N)�_loop�_sink�create_task�_detect_strategy_changer )r �loop�sinks r � create_sourcezStrategyGetter.create_source s9 � � � ��� ��� ��&�&�t�'C�'C�'E�'E�F�F����r c � � K � | j �| j � � � rd S | j � � � t j t j � � 5 | j � d {V �� d d d � � d S # 1 swxY w Y d S r )r �done�cancel� contextlib�suppress�asyncio�CancelledError�r s r �shutdownzStrategyGetter.shutdown s� � � � ��;��$�+�"2�"2�"4�"4���F�������� � ��!7� 8� 8� � ��+�������� � � � � � � � � � � � ���� � � � � � s �A7�7A;�>A;c � �� K � t j t j � � 5 | � � � � d{V �� t j t j j � � � d{V �� �D# 1 swxY w Y dS )z+Check whether IDS has changed periodically.TN) r! r"