관리-도구
편집 파일: outdated_scans.cpython-311.pyc
� ��g7 � �L � d Z ddlZddlZddlZddlmZ ddlmZmZ ddlm Z ddl mZ ddlm Z mZmZ ddlmZ dd lmZmZmZ dd lmZ ddlmZ ddlmZ dd lmZ ddlmZ ddl m!Z! ddl"m#Z#m$Z$ e e%� � Z& G d� de� � Z' G d� de� � Z( G d� de� � Z)dS )u This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. Copyright © 2019 Cloud Linux Software Inc. This software is also available under ImunifyAV commercial license, see <https://www.imunify360.com/legal/eula> � N)�suppress)�datetime� timedelta)� getLogger)�Path)�MalwareHitStatus�MalwareScanResourceType�MalwareScanType)�MalwareCleanupProxy)�MalwareHistory� MalwareHit�MalwareScan)�realtime_av)� inactivity)�MessageType)�g)�BaseCleaner)�persistent_state)� nice_iterator�split_for_chunkc �z � e Zd Z ed�� � � � � Z ed�� � Zedd�� � ZdS )�OutdatedScansCleaner� ��days� �returnNc � �@ K � t t j � � | j z � � � � � }t j � � � t j |k � � � � � }t � d|� � d S )NzCleaned %s outdated scans)�intr �now�CLEANUP_LIMIT_DELTA� timestampr �delete�where�started�execute�logger�info)�cls�cleanup_time_limit�deleteds �a/opt/imunify360/venv/lib/python3.11/site-packages/imav/malwarelib/scan/cleaners/outdated_scans.py�cleanupzOutdatedScansCleaner.cleanup4 s� � � � � � �\�^�^�c�5� 5�@�@�B�B� � �� �� � � �U�;�&�);�;� <� <� �W�Y�Y� � ���/��9�9�9�9�9� �r N� �__name__� __module__�__qualname__r � total_seconds�PERIODr! �classmethodr- � r. r, r r 0 sc � � � � � � �Y�A� � � � ,� ,� .� .�F�#�)��,�,�,��� :� :� :� �[� :� :� :r. r c �z � e Zd Z ed�� � � � � Z ed�� � Zedd�� � ZdS )�OutdatedHistoryCleanerr r r r Nc � �@ K � t t j � � | j z � � � � � }t j � � � t j |k � � � � � }t � d|� � d S )Nz#Cleaned %s outdated malware history)r r r r! r"