hC |dZddlZddlmZddlmZmZmZddlm Z ej e Z GddeeZ 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 . Copyright © 2019 Cloud Linux Software Inc. This software is also available under ImunifyAV commercial license, see N) MessageType) MessageSink MessageSourceexpect)QueueSupervisorSyncc eZdZdxZxZZdZdZee j dZ ee j dZ ee jdZee jdZee jdZdS) QueueSupervisorNcK||_dSN)loop)selfr s W/opt/imunify360/venv/lib/python3.11/site-packages/imav/malwarelib/plugins/scan_queue.py create_sinkzQueueSupervisor.create_sink(s cKt||}|t_|t_|t_|t jd{VdS)N)r sink)rr supervisorr rprocess_messagerMalwareScanQueueRecheck)r r rrs r create_sourcezQueueSupervisor.create_source+se(d>>> %/"##"";#F#H#HIIIIIIIIIIIrcPK|jj|jfi|jd{VdSr )rputpaths scan_argsr messages rrzQueueSupervisor.put3s@!do!'-EE73DEEEEEEEEEEErcHK|j|jdSr )rremovescan_idsrs rrzQueueSupervisor.remove7s% w/00000rc<K|jdSr )rrecheckrs rnextzQueueSupervisor.next;s  !!!!!rc<K|jdSr )rclear_backgroundrs rstop_backgroundzQueueSupervisor.stop_background?s  ((*****rc`K|j|j|jd{VdSr )rupdate_scan_statusrstatusrs rr'z"QueueSupervisor.update_scan_statusCsRo00  gn           r)__name__ __module__ __qualname__rr rrrrrMalwareScanQueuePutrMalwareScanQueueRemoverrr"MalwareScanQueueStopBackgroundr%MalwareScanQueueUpdateStatusr'rrr r %s##J#JJJ VK +,,FF-,F VK .//110/1 VK /00""10" VK 677++87+ VK 455  65   rr )__doc__logging"defence360agent.contracts.messagesr!defence360agent.contracts.pluginsrrr*imav.malwarelib.scan.queue_supervisor_syncr getLoggerr)loggerr r0rrr8s*::::::   8 $ $" " " " " k=" " " " " r