Merge pull request #3367 from betagouv/add-logs-to-antivirus-job
Add logs to AntivirusJob
This commit is contained in:
commit
fbd10f7758
1 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
class ClamavService
|
||||
def self.safe_file?(file_path)
|
||||
if Rails.env.development?
|
||||
Rails.logger.info("Rails.env = development => fake scan") # FIXME : remove me
|
||||
return true
|
||||
end
|
||||
|
||||
|
@ -8,7 +9,7 @@ class ClamavService
|
|||
|
||||
client = ClamAV::Client.new
|
||||
response = client.execute(ClamAV::Commands::ScanCommand.new(file_path))
|
||||
|
||||
Rails.logger.info("ClamAV response for #{file_path} : #{response.first.class.name}") # FIXME : remove me
|
||||
response.first.class != ClamAV::VirusResponse
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue