g dZddlmZddlmZmZmZddlmZddl m Z ddl m Z ddl mZmZmZddlmZeeZGd d eeZd S) 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 . Copyright © 2019 Cloud Linux Software Inc. This software is also available under ImunifyAV commercial license, see ) getLogger)expect MessageSource MessageSink) MessageType)recurring_check)MalwareDetachedDirCleaner)OutdatedHistoryCleanerOutdatedHitsCleanerOutdatedScansCleaner)UncompletedScansCleanercdeZdZeeeegZdZdZ dZ e e j dZdZdS)MrProperc0d|_d|_g|_dSN)_loop_sink_tasks)selfs K/opt/imunify360/venv/lib/python3.11/site-packages/imav/plugins/mr_proper.py__init__zMrProper.__init__6s   c K||_||_|jD]\}|j|jt |j|j]dSr) rrCLEANERSrappend create_taskrPERIODcleanup)rloopsinkcleaners r create_sourcezMrProper.create_source;s  }  G K   &&D3OGN33GODDFF      rc KdSr)rrs r create_sinkzMrProper.create_sinkEs  rcpKtjd{VtddS)NzDetached scans checked)r rloggerinfo)r_s rcheck_detached_scanszMrProper.check_detached_scansHs@%-///////// ,-----rcjK|jD]}||jD] }|d{V dSr)rcancel)rtasks rshutdownzMrProper.shutdownMsVK  D KKMMMMK  DJJJJJJJJ  rN)__name__ __module__ __qualname__r r r r rrr"r%rrCheckDetachedScansr*r.r$rrrr.s! H     VK *++..,+.rrN)__doc__loggingr!defence360agent.contracts.pluginsrrr"defence360agent.contracts.messagesrdefence360agent.utilsr*imav.malwarelib.scan.cleaners.detached_dirr ,imav.malwarelib.scan.cleaners.outdated_scansr r r /imav.malwarelib.scan.cleaners.uncompleted_scansr r/r'rr$rrr;s0* ;:::::111111  8  %%%%%}k%%%%%r