class Libis::Ingester::VirusChecker
Public Instance Methods
pre_process(item)
click to toggle source
Calls superclass method
Libis::Ingester::Task#pre_process
# File lib/libis/ingester/tasks/virus_checker.rb, line 15 def pre_process(item) super skip_processing_item if item.options['virus_checked'] end
process(item)
click to toggle source
# File lib/libis/ingester/tasks/virus_checker.rb, line 20 def process(item) debug 'Scanning file for viruses' # noinspection RubyResolve cmd_options = Libis::Ingester::Config.virusscanner['options'] # noinspection RubyResolve result = Libis::Tools::Command.run Libis::Ingester::Config.virusscanner[:command], *cmd_options, item.fullpath raise Libis::WorkflowError, "Error during viruscheck: #{result[:err]}" unless result[:status] item.options['virus_checked'] = true debug 'File is clean' end