관리-도구
편집 파일: checkpoint.cpython-311.opt-1.pyc
� IMg� � �F � d dl mZ d dlmZ d dlmZ G d� de� � ZdS )� )�MessageSink)�db)�recurring_checkc �6 � e Zd ZdZdZeed�d�Zd� Zd� Zd� Z dS ) � CheckpointzU Checkpoint imunify360.db periodically to limit unexpected WAL file growing. i�Q )�checkpoint_periodr c �0 � || _ || _ d | _ d S �N)�_checkpoint_period�_db�_task)�selfr r s �W/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/plugins/checkpoint.py�__init__zCheckpoint.__init__ s � �"3�������� � � � c � � K � || _ | j � t | j � � | j � � � � � � | _ d S r )�_loop�create_taskr r �_checkpointr )r �loops r �create_sinkzCheckpoint.create_sink sN � � � ��� ��Z�+�+�F�4�O�D�3�4�4�T�5E�F�F�H�H� � �� � � r c � � K � | j d c}| _ |�|� � � rd S |� � � |� d {V �� d S r )r � cancelled�cancel)r �tasks r �shutdownzCheckpoint.shutdown sP � � � ��:�t���d�j��<�4�>�>�+�+�<��F���� � � �� � � � � � � � � r c � �>